Changeset 12890 in osm for applications
- Timestamp:
- 2009-01-03T23:00:06+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java
r12778 r12890 4 4 5 5 import java.util.HashSet; 6 import java.util.LinkedList; 6 7 import java.util.Map; 7 8 import java.util.Set; 8 9 10 import org.openstreetmap.josm.Main; 9 11 import org.openstreetmap.josm.command.Command; 10 12 import org.openstreetmap.josm.command.DeleteCommand; 13 import org.openstreetmap.josm.data.osm.Relation; 14 import org.openstreetmap.josm.data.osm.RelationMember; 11 15 import org.openstreetmap.josm.data.osm.Way; 12 16 import org.openstreetmap.josm.plugins.validator.Severity; … … 29 33 /** One node way error */ 30 34 protected static final int ONE_NODE_WAY = 304; 35 36 private LinkedList<Way> multipolygonways; 31 37 32 38 /** Ways that must have a name */ … … 79 85 } 80 86 81 if(!w.tagged) 87 if(!w.tagged && !multipolygonways.contains(w)) 82 88 { 83 89 errors.add( new TestError(this, Severity.WARNING, tr("Untagged ways"), UNTAGGED_WAY, w) ); … … 93 99 } 94 100 101 } 102 103 @Override 104 public void startTest() 105 { 106 multipolygonways = new LinkedList<Way>(); 107 for (final Relation r : Main.ds.relations) 108 { 109 if(!r.deleted && !r.incomplete && r.keys != null 110 && "multipolygon".equals(r.keys.get("type"))) 111 { 112 for (RelationMember m : r.members) 113 { 114 if(m.member != null && m.member instanceof Way && 115 !m.member.deleted && !m.member.incomplete 116 && !m.member.tagged) 117 multipolygonways.add((Way)m.member); 118 } 119 } 120 } 121 } 122 123 @Override 124 public void endTest() 125 { 126 multipolygonways = null; 95 127 } 96 128
Note:
See TracChangeset
for help on using the changeset viewer.