Changeset 17479 in osm
- Timestamp:
- 2009-09-06T13:27:25+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 1 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/build.xml
r17352 r17479 26 26 <attribute name="Plugin-Description" value="An OSM data validator. It checks for problems in data, and provides fixes for the common ones. Spellcheck integrated for tag names."/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Validator"/> 28 <attribute name="Plugin-Mainversion" value="20 05"/>28 <attribute name="Plugin-Mainversion" value="2067"/> 29 29 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 30 </manifest> -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
r17351 r17479 39 39 import org.openstreetmap.josm.plugins.validator.tests.CrossingWays; 40 40 import org.openstreetmap.josm.plugins.validator.tests.DuplicateNode; 41 import org.openstreetmap.josm.plugins.validator.tests.DuplicateWay; 41 42 import org.openstreetmap.josm.plugins.validator.tests.DuplicatedWayNodes; 42 43 import org.openstreetmap.josm.plugins.validator.tests.NodesWithSameName; … … 97 98 TagChecker.class, // ID 1201 .. 1299 98 99 UnconnectedWays.class, // ID 1301 .. 1399 100 DuplicateWay.class, // ID 1401 .. 1499 99 101 }; 100 102 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java
r14406 r17479 124 124 for (OsmPrimitive p : selection) 125 125 { 126 if( !p.deleted && !p.incomplete)126 if( p.isUsable() ) 127 127 p.visit(this); 128 128 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/TestError.java
r17351 r17479 153 153 for (OsmPrimitive o : primitives) { 154 154 // ignore data not yet uploaded 155 if (o. id== 0)155 if (o.getId() == 0) 156 156 return null; 157 157 String type = "u"; … … 162 162 else if (o instanceof Node) 163 163 type = "n"; 164 strings.add(type + "_" + o. id);164 strings.add(type + "_" + o.getId()); 165 165 } 166 166 for (String o : strings) { … … 269 269 270 270 public void visit(OsmPrimitive p) { 271 if ( !p.deleted && !p.incomplete) {271 if (p.isUsable()) { 272 272 p.visit(this); 273 273 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
r17351 r17479 415 415 416 416 public void visit(OsmPrimitive p) { 417 if ( !p.deleted && !p.incomplete) {417 if (p.isUsable()) { 418 418 p.visit(this); 419 419 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/ChangePropertyKeyCommand.java
r17351 r17479 53 53 if(osm.hasKeys()) 54 54 { 55 osm. modified= true;56 String oldValue= osm.get(key); 57 osm.put(newKey, oldValue 55 osm.setModified(true); 56 String oldValue = osm.get(key); 57 osm.put(newKey, oldValue); 58 58 osm.remove(key); 59 59 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/Coastlines.java
r17351 r17479 54 54 public void visit(Way w) 55 55 { 56 if( w.deleted || w.incomplete)56 if( !w.isUsable() ) 57 57 return; 58 58 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/CrossingWays.java
r17351 r17479 67 67 public void visit(Way w) 68 68 { 69 if( w.deleted || w.incomplete)69 if( !w.isUsable() ) 70 70 return; 71 71 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
r16970 r17479 67 67 public void visit(Node n) 68 68 { 69 if( !n.deleted && !n.incomplete)69 if(n.isUsable()) 70 70 nodes.add(n.getCoor(), n); 71 71 } … … 91 91 // select the target node in the same way as in the core action MergeNodesAction, rev.1084 92 92 for (Node n: nodes) { 93 if (n. id> 0) {93 if (n.getId() > 0) { 94 94 target = n; 95 95 break; … … 119 119 if (a != null) { 120 120 for (OsmPrimitive osm : del) { 121 if (osm instanceof Node && osm. id!= 0) {121 if (osm instanceof Node && osm.getId() != 0) { 122 122 Node n = (Node) osm; 123 123 if (!a.contains(n.getCoor())) { -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicatedWayNodes.java
r17351 r17479 25 25 26 26 @Override public void visit(Way w) { 27 if ( w.deleted || w.incomplete) return;27 if (!w.isUsable()) return; 28 28 29 29 Node lastN = null; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/NodesWithSameName.java
r13497 r17479 28 28 29 29 @Override public void visit(Node n) { 30 if ( n.deleted || n.incomplete) return;30 if (!n.isUsable()) return; 31 31 32 32 String name = n.get("name"); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SimilarNamedWays.java
r13497 r17479 55 55 public void visit(Way w) 56 56 { 57 if( w.deleted || w.incomplete)57 if( !w.isUsable() ) 58 58 return; 59 59 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java
r17351 r17479 69 69 mode = 0; 70 70 71 if ( w.deleted || w.incomplete)71 if (!w.isUsable()) 72 72 return; 73 73 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java
r17351 r17479 190 190 public void visit(Way w) 191 191 { 192 if( w.deleted || w.incomplete)192 if( !w.isUsable() ) 193 193 return; 194 194 int size = w.getNodesCount(); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedNode.java
r17351 r17479 52 52 if (partialSelection) { 53 53 for (OsmPrimitive p : selection) { 54 if ( !p.deleted && !p.incomplete&& p instanceof Node) {54 if (p.isUsable() && p instanceof Node) { 55 55 p.visit(this); 56 56 } … … 61 61 } else { 62 62 for (OsmPrimitive p : selection) { 63 if ( !p.deleted && !p.incomplete) {63 if (p.isUsable()) { 64 64 p.visit(this); 65 65 } … … 71 71 public void visit(Node n) 72 72 { 73 if( !n.incomplete && !n.deleted&& !n.isTagged())73 if(n.isUsable() && !n.isTagged()) 74 74 emptyNodes.add(n); 75 75 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java
r17351 r17479 63 63 public void visit(Way w) 64 64 { 65 if ( w.deleted || w.incomplete) return;65 if (!w.isUsable()) return; 66 66 67 67 Map<String, String> tags = w.getKeys(); 68 if( tags != null)68 if( tags.size() != 0 ) 69 69 { 70 70 String highway = tags.get("highway"); … … 117 117 for (final Relation r : Main.main.getCurrentDataSet().relations) 118 118 { 119 if(!r.deleted && !r.incomplete && r.getKeys() != null 120 && "multipolygon".equals(r.get("type"))) 119 if(r.isUsable() && "multipolygon".equals(r.get("type"))) 121 120 { 122 121 for (RelationMember m : r.members) 123 122 { 124 123 if(m.member != null && m.member instanceof Way && 125 !m.member.deleted && !m.member.incomplete 126 && !m.member.isTagged()) 124 m.member.isUsable() && !m.member.isTagged()) 127 125 multipolygonways.add((Way)m.member); 128 126 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/WronglyOrderedWays.java
r17351 r17479 53 53 int type; 54 54 55 if( w.deleted || w.incomplete)55 if( !w.isUsable() ) 56 56 return; 57 57 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/NameVisitor.java
r16629 r17479 79 79 private void addId(OsmPrimitive osm) { 80 80 if (Main.pref.getBoolean("osm-primitives.showid")) 81 name += tr(" [id: {0}]", osm. id);81 name += tr(" [id: {0}]", osm.getId()); 82 82 } 83 83 }
Note:
See TracChangeset
for help on using the changeset viewer.