- Timestamp:
- 2013-02-08T12:12:23+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
r5667 r5700 35 35 { 36 36 37 /** 38 * Class to store a way reduced to coordinates and keys. Essentially this is used to call the 39 * <code>equals{}</code> function. 40 */ 37 41 private static class WayPair { 38 42 public List<LatLon> coor; … … 57 61 } 58 62 63 /** 64 * Class to store a way reduced to coordinates. Essentially this is used to call the 65 * <code>equals{}</code> function. 66 */ 59 67 private static class WayPairNoTags { 60 68 public List<LatLon> coor; … … 74 82 } 75 83 84 /** Test identification for exactly identical ways (coordinates and tags). */ 76 85 protected static final int DUPLICATE_WAY = 1401; 86 /** Test identification for identical ways (coordinates only). */ 77 87 protected static final int SAME_WAY = 1402; 78 88 … … 93 103 tr("This test checks that there are no ways with same node coordinates and optionally also same tags.")); 94 104 } 95 96 105 97 106 @Override … … 145 154 146 155 /** 147 * Remove uninteresting keys, like created_byto normalize the tags156 * Remove uninteresting discardable keys to normalize the tags 148 157 * @param wkeys The tags of the way, obtained by {@code Way#getKeys} 149 158 */ 150 159 public void removeUninterestingKeys(Map<String, String> wkeys) { 151 wkeys.remove("created_by"); 160 for(String key : OsmPrimitive.getDiscardableKeys()) { 161 wkeys.remove(key); 162 } 152 163 } 153 164 -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r5400 r5700 253 253 cmds.addAll(buildTagChangeCommand(targetPrimitive, allResolutions)); 254 254 } 255 if (targetPrimitive.get("created_by") != null) { 256 cmds.add(new ChangePropertyCommand(targetPrimitive, "created_by", null)); 255 for(String p : targetPrimitive.getDiscardableKeys()) { 256 if (targetPrimitive.get(p) != null) { 257 cmds.add(new ChangePropertyCommand(targetPrimitive, p, null)); 258 } 257 259 } 258 260 -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java
r3083 r5700 33 33 // remove irrelevant tags 34 34 // 35 tc.removeByKey("created_by"); 35 for(String key : OsmPrimitive.getDiscardableKeys()) { 36 tc.removeByKey(key); 37 } 36 38 37 39 int numNodesWithTags = 0;
Note:
See TracChangeset
for help on using the changeset viewer.