Changeset 15 in josm for src/org/openstreetmap/josm/data/osm/DataSet.java
- Timestamp:
- 2005-10-07T01:13:49+02:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/data/osm/DataSet.java
r8 r15 113 113 Node first = nodes.iterator().next(); 114 114 Bounds b = new Bounds(first.coor.clone(), first.coor.clone()); 115 for (Node w: nodes)115 for (Node n : nodes) 116 116 { 117 if (Double.isNaN( w.coor.x) || Double.isNaN(w.coor.y))117 if (Double.isNaN(n.coor.x) || Double.isNaN(n.coor.y)) 118 118 return null; 119 if ( w.coor.x < b.min.x)120 b.min.x = w.coor.x;121 if ( w.coor.y < b.min.y)122 b.min.y = w.coor.y;123 if ( w.coor.x > b.max.x)124 b.max.x = w.coor.x;125 if ( w.coor.y > b.max.y)126 b.max.y = w.coor.y;119 if (n.coor.x < b.min.x) 120 b.min.x = n.coor.x; 121 if (n.coor.y < b.min.y) 122 b.min.y = n.coor.y; 123 if (n.coor.x > b.max.x) 124 b.max.x = n.coor.x; 125 if (n.coor.y > b.max.y) 126 b.max.y = n.coor.y; 127 127 } 128 128 return b;
Note:
See TracChangeset
for help on using the changeset viewer.