Changeset 1753 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-07-08T22:58:37+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r1750 r1753 168 168 } 169 169 170 170 171 private void fixWay(Way w) { 171 172 boolean replacedSomething = false; 172 173 LinkedList<Node> newNodes = new LinkedList<Node>(); 173 for (Node n : w.nodes) { 174 Node otherN = (Node) merged.get(n); 175 newNodes.add(otherN == null ? n : otherN); 176 if (otherN != null) { 177 replacedSomething = true; 174 for (Node myNode : w.nodes) { 175 Node mergedNode = (Node) merged.get(myNode); 176 if (mergedNode != null) { 177 if (!mergedNode.deleted) { 178 newNodes.add(mergedNode); 179 } 180 replacedSomething = true; 181 } else { 182 newNodes.add(myNode); 178 183 } 179 184 } … … 187 192 boolean replacedSomething = false; 188 193 LinkedList<RelationMember> newMembers = new LinkedList<RelationMember>(); 189 for (RelationMember m : r.members) {190 OsmPrimitive otherP = merged.get(m.member);191 if ( otherP== null) {192 newMembers.add(m );194 for (RelationMember myMember : r.members) { 195 OsmPrimitive mergedMember = merged.get(myMember.member); 196 if (mergedMember == null) { 197 newMembers.add(myMember); 193 198 } else { 194 RelationMember mnew = new RelationMember(m); 195 mnew.member = otherP; 196 newMembers.add(mnew); 199 if (! mergedMember.deleted) { 200 RelationMember newMember = new RelationMember(myMember); 201 newMember.member = mergedMember; 202 newMembers.add(newMember); 203 } 197 204 replacedSomething = true; 198 205 }
Note:
See TracChangeset
for help on using the changeset viewer.