Changeset 60 in josm for src/org/openstreetmap
- Timestamp:
- 2006-03-14T17:41:14+01:00 (19 years ago)
- Location:
- src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r57 r60 188 188 private boolean match(Track t1, Track t2) { 189 189 if (t1.id == 0 || t2.id == 0) { 190 if (t1.segments.size() != t2.segments.size()) 191 return false; 190 192 Iterator<LineSegment> it = t1.segments.iterator(); 191 193 for (LineSegment ls : t2.segments) -
src/org/openstreetmap/josm/io/OsmReader.java
r59 r60 80 80 n.coor = new GeoPoint(getDouble(atts, "lat"), getDouble(atts, "lon")); 81 81 current = n; 82 readCommon(atts); 82 83 current.id = getLong(atts, "id"); 83 84 nodes.put(n.id, n); … … 86 87 nodes.get(getLong(atts, "from")), 87 88 nodes.get(getLong(atts, "to"))); 88 current.id = getLong(atts, "id");89 readCommon(atts); 89 90 lineSegments.put(current.id, (LineSegment)current); 90 91 } else if (qName.equals("way")) { 91 92 current = new Track(); 92 current.id = getLong(atts, "id");93 readCommon(atts); 93 94 } else if (qName.equals("seg")) { 94 95 if (current instanceof Track) … … 102 103 throw new SAXException("NullPointerException. Possible some missing tags.", x); 103 104 } 105 } 106 107 /** 108 * Read out the common attributes from atts and put them into this.current. 109 */ 110 private void readCommon(Attributes atts) { 111 current.id = getLong(atts, "id"); 112 String action = atts.getValue("action"); 113 if ("delete".equals(action)) 114 current.setDeleted(true); 115 else if ("modify".equals(action)) { 116 current.modified = true; 117 current.modifiedProperties = true; 118 } else if ("modify/object".equals(action)) 119 current.modified = true; 120 else if ("modify/property".equals(action)) 121 current.modifiedProperties = true; 104 122 } 105 123
Note:
See TracChangeset
for help on using the changeset viewer.