Changeset 16159 in osm
- Timestamp:
- 2009-06-26T21:45:10+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/build.xml
r15127 r16159 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="1 598"/>28 <attribute name="Plugin-Mainversion" value="1638"/> 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/GridLayer.java
r14406 r16159 160 160 public void visit(Node n) 161 161 { 162 double x = n. eastNorth.east() * gridDetail;163 double y = n. eastNorth.north()* gridDetail + 1;162 double x = n.getEastNorth().east() * gridDetail; 163 double y = n.getEastNorth().north()* gridDetail + 1; 164 164 165 165 drawCell( Math.floor(x), Math.floor(y) ); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/TestError.java
r14406 r16159 280 280 */ 281 281 public void drawNode(Node n, Color color) { 282 Point p = mv.getPoint(n. eastNorth);282 Point p = mv.getPoint(n.getEastNorth()); 283 283 g.setColor(color); 284 284 if (selected) { … … 295 295 */ 296 296 public void drawSegment(Node n1, Node n2, Color color) { 297 Point p1 = mv.getPoint(n1. eastNorth);298 Point p2 = mv.getPoint(n2. eastNorth);297 Point p1 = mv.getPoint(n1.getEastNorth()); 298 Point p2 = mv.getPoint(n2.getEastNorth()); 299 299 g.setColor(color); 300 300 … … 365 365 */ 366 366 protected boolean isNodeVisible(Node n) { 367 Point p = mv.getPoint(n. eastNorth);367 Point p = mv.getPoint(n.getEastNorth()); 368 368 return !((p.x < 0) || (p.y < 0) || (p.x > mv.getWidth()) || (p.y > mv.getHeight())); 369 369 } … … 377 377 */ 378 378 protected boolean isSegmentVisible(Node n1, Node n2) { 379 Point p1 = mv.getPoint(n1. eastNorth);380 Point p2 = mv.getPoint(n2. eastNorth);379 Point p1 = mv.getPoint(n1.getEastNorth()); 380 Point p2 = mv.getPoint(n2.getEastNorth()); 381 381 if ((p1.x < 0) && (p2.x < 0)) 382 382 return false; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/CrossingWays.java
r13497 r16159 203 203 204 204 return Line2D.linesIntersect( 205 n1. eastNorth.east(), n1.eastNorth.north(),206 n2. eastNorth.east(), n2.eastNorth.north(),207 s2.n1. eastNorth.east(), s2.n1.eastNorth.north(),208 s2.n2. eastNorth.east(), s2.n2.eastNorth.north());205 n1.getEastNorth().east(), n1.getEastNorth().north(), 206 n2.getEastNorth().east(), n2.getEastNorth().north(), 207 s2.n1.getEastNorth().east(), s2.n1.getEastNorth().north(), 208 s2.n2.getEastNorth().east(), s2.n2.getEastNorth().north()); 209 209 } 210 210 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
r13497 r16159 59 59 { 60 60 if(!n.deleted && !n.incomplete) 61 nodes.add(n. coor, n);61 nodes.add(n.getCoor(), n); 62 62 } 63 63 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java
r13598 r16159 107 107 Node f = w.nodes.get(0); 108 108 Node l = w.nodes.get(w.nodes.size() - 1); 109 if(force || f. coor.greatCircleDistance(l.coor) < 10000)109 if(force || f.getCoor().greatCircleDistance(l.getCoor()) < 10000) 110 110 { 111 111 List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>(); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java
r14015 r16159 67 67 for(MyWaySegment s : ways) 68 68 { 69 if(s.highway && s.nearby(en, mindist) && (a == null || a.contains(en. coor)))69 if(s.highway && s.nearby(en, mindist) && (a == null || a.contains(en.getCoor()))) 70 70 map.put(en, s.w); 71 71 } … … 85 85 for(MyWaySegment s : ways) 86 86 { 87 if(!s.highway && s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en. coor)))87 if(!s.highway && s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en.getCoor()))) 88 88 map.put(en, s.w); 89 89 } … … 93 93 for(MyWaySegment s : ways) 94 94 { 95 if(s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en. coor)))95 if(s.nearby(en, mindist) && !s.isArea() && (a == null || a.contains(en.getCoor()))) 96 96 map.put(en, s.w); 97 97 } … … 114 114 for(MyWaySegment s : ways) 115 115 { 116 if(s.nearby(en, minmiddledist) && (a == null || a.contains(en. coor)))116 if(s.nearby(en, minmiddledist) && (a == null || a.contains(en.getCoor()))) 117 117 map.put(en, s.w); 118 118 } … … 132 132 for(MyWaySegment s : ways) 133 133 { 134 if(s.nearby(en, minmiddledist) && (a == null || a.contains(en. coor)))134 if(s.nearby(en, minmiddledist) && (a == null || a.contains(en.getCoor()))) 135 135 map.put(en, s.w); 136 136 } … … 160 160 this.w = w; 161 161 this.highway = w.get("highway") != null || w.get("railway") != null; 162 line = new Line2D.Double(n1. eastNorth.east(), n1.eastNorth.north(),163 n2. eastNorth.east(), n2.eastNorth.north());162 line = new Line2D.Double(n1.getEastNorth().east(), n1.getEastNorth().north(), 163 n2.getEastNorth().east(), n2.getEastNorth().north()); 164 164 } 165 165 … … 167 167 { 168 168 return !w.nodes.contains(n) 169 && line.ptSegDist(n. eastNorth.east(), n.eastNorth.north()) < dist;169 && line.ptSegDist(n.getEastNorth().east(), n.getEastNorth().north()) < dist; 170 170 } 171 171 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/WronglyOrderedWays.java
r13497 r16159 94 94 for (int node = 1; node < w.nodes.size(); node++) 95 95 { 96 area2 += (w.nodes.get(node-1). coor.lon() * w.nodes.get(node).coor.lat()97 - w.nodes.get(node). coor.lon() * w.nodes.get(node-1).coor.lat());96 area2 += (w.nodes.get(node-1).getCoor().lon() * w.nodes.get(node).getCoor().lat() 97 - w.nodes.get(node).getCoor().lon() * w.nodes.get(node-1).getCoor().lat()); 98 98 } 99 99 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/AgregatePrimitivesVisitor.java
r14406 r16159 2 2 3 3 import java.util.Collection; 4 import java.util.Comparator;5 4 import java.util.LinkedList; 6 5 7 import org.openstreetmap.josm.data.osm.*; 6 import org.openstreetmap.josm.data.osm.Node; 7 import org.openstreetmap.josm.data.osm.OsmPrimitive; 8 import org.openstreetmap.josm.data.osm.Relation; 9 import org.openstreetmap.josm.data.osm.RelationMember; 10 import org.openstreetmap.josm.data.osm.Way; 8 11 import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor; 9 12 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/Util.java
r13497 r16159 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 import org.openstreetmap.josm.data.osm.Way; 14 import org.openstreetmap.josm.plugins.PluginInformation;15 14 import org.openstreetmap.josm.plugins.validator.OSMValidatorPlugin; 16 15 … … 51 50 52 51 // First, round coordinates 53 long x0 = Math.round(n1. eastNorth.east() * OSMValidatorPlugin.griddetail);54 long y0 = Math.round(n1. eastNorth.north() * OSMValidatorPlugin.griddetail);55 long x1 = Math.round(n2. eastNorth.east() * OSMValidatorPlugin.griddetail);56 long y1 = Math.round(n2. eastNorth.north() * OSMValidatorPlugin.griddetail);52 long x0 = Math.round(n1.getEastNorth().east() * OSMValidatorPlugin.griddetail); 53 long y0 = Math.round(n1.getEastNorth().north() * OSMValidatorPlugin.griddetail); 54 long x1 = Math.round(n2.getEastNorth().east() * OSMValidatorPlugin.griddetail); 55 long y1 = Math.round(n2.getEastNorth().north() * OSMValidatorPlugin.griddetail); 57 56 58 57 // Start of the way … … 82 81 83 82 // Then floor coordinates, in case the way is in the border of the cell. 84 x0 = (long)Math.floor(n1. eastNorth.east() * OSMValidatorPlugin.griddetail);85 y0 = (long)Math.floor(n1. eastNorth.north() * OSMValidatorPlugin.griddetail);86 x1 = (long)Math.floor(n2. eastNorth.east() * OSMValidatorPlugin.griddetail);87 y1 = (long)Math.floor(n2. eastNorth.north() * OSMValidatorPlugin.griddetail);83 x0 = (long)Math.floor(n1.getEastNorth().east() * OSMValidatorPlugin.griddetail); 84 y0 = (long)Math.floor(n1.getEastNorth().north() * OSMValidatorPlugin.griddetail); 85 x1 = (long)Math.floor(n2.getEastNorth().east() * OSMValidatorPlugin.griddetail); 86 y1 = (long)Math.floor(n2.getEastNorth().north() * OSMValidatorPlugin.griddetail); 88 87 89 88 // Start of the way … … 131 130 { 132 131 List<Point2D> cells = new ArrayList<Point2D>(); 133 double x0 = n1. eastNorth.east() * gridDetail;134 double x1 = n2. eastNorth.east() * gridDetail;135 double y0 = n1. eastNorth.north() * gridDetail + 1;136 double y1 = n2. eastNorth.north() * gridDetail + 1;132 double x0 = n1.getEastNorth().east() * gridDetail; 133 double x1 = n2.getEastNorth().east() * gridDetail; 134 double y0 = n1.getEastNorth().north() * gridDetail + 1; 135 double y1 = n2.getEastNorth().north() * gridDetail + 1; 137 136 138 137 if( x0 > x1 )
Note:
See TracChangeset
for help on using the changeset viewer.