- Timestamp:
- 2009-08-10T13:13:31+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r1937 r1948 150 150 } 151 151 152 protected void fixIncomplete(Way w) { 153 if (!w.incomplete)return; 154 if (w.incomplete && w.getNodesCount() == 0) return; 155 for (Node n: w.getNodes()) { 156 if (n.incomplete) return; 157 } 158 w.incomplete = false; 159 } 160 152 161 /** 153 162 * Postprocess the dataset and fix all merged references to point to the actual … … 157 166 for (Way w : myDataSet.ways) { 158 167 fixWay(w); 168 fixIncomplete(w); 159 169 } 160 170 for (Relation r : myDataSet.relations) { … … 243 253 // 244 254 conflicts.add(my,other); 245 } else if (my.incomplete ) {255 } else if (my.incomplete && !other.incomplete) { 246 256 // my is incomplete, other completes it 247 257 // => merge other onto my … … 249 259 my.incomplete = false; 250 260 my.cloneFrom(other); 261 merged.put(other, my); 262 } else if (!my.incomplete && other.incomplete) { 263 // my is complete and the other is incomplete 264 // => keep mine, we have more information already 265 // 266 merged.put(other, my); 267 } else if (my.incomplete && other.incomplete) { 268 // my and other are incomplete. Doesn't matter which one to 269 // take. We take mine. 270 // 251 271 merged.put(other, my); 252 272 } else if (my.deleted && ! other.deleted && my.version == other.version) {
Note:
See TracChangeset
for help on using the changeset viewer.