Changeset 1226 in josm
- Timestamp:
- 2009-01-09T21:36:04+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java
r1169 r1226 5 5 import org.openstreetmap.josm.data.Bounds; 6 6 import org.openstreetmap.josm.data.coor.EastNorth; 7 import org.openstreetmap.josm.data.coor.LatLon; 7 8 import org.openstreetmap.josm.data.osm.Node; 8 9 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 61 62 62 63 /** 63 * Enlarges the calculated bounding box by 0.00 01degrees.64 * Enlarges the calculated bounding box by 0.002 degrees. 64 65 * If the bounding box has not been set (<code>min</code> or <code>max</code> 65 66 * equal <code>null</code>) this method does not do anything. … … 68 69 */ 69 70 public void enlargeBoundingBox() { 70 enlargeBoundingBox(0.00 01);71 enlargeBoundingBox(0.002); 71 72 } 72 73 … … 81 82 if (min == null || max == null) 82 83 return; 83 EastNorth en = new EastNorth(enlargeDegree, enlargeDegree); 84 min = new EastNorth(min.east() - en.east(), min.north() - en.north()); 85 max = new EastNorth(max.east() + en.east(), max.north() + en.north()); 84 LatLon minLatlon = Main.proj.eastNorth2latlon(min); 85 min = Main.proj.latlon2eastNorth(new LatLon(minLatlon.lat() - enlargeDegree, minLatlon.lon() - enlargeDegree)); 86 LatLon maxLatlon = Main.proj.eastNorth2latlon(max); 87 max = Main.proj.latlon2eastNorth(new LatLon(maxLatlon.lat() + enlargeDegree, maxLatlon.lon() + enlargeDegree)); 86 88 } 87 89 }
Note:
See TracChangeset
for help on using the changeset viewer.