- Timestamp:
- 2017-09-10T15:49:59+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/AbstractProjection.java
r12819 r12820 148 148 if (proj.lonIsLinearToEast()) { 149 149 //FIXME: Respect datum? 150 // wrap the w rold around150 // wrap the world around 151 151 Bounds bounds = getWorldBoundsLatLon(); 152 152 double minEast = latlon2eastNorth(bounds.getMin()).east(); … … 225 225 226 226 private void visitOutline(Bounds b, int nPoints, Consumer<EastNorth> visitor) { 227 double m inlon = b.getMinLon();227 double maxlon = b.getMaxLon(); 228 228 if (b.crosses180thMeridian()) { 229 m inlon -= 360.0;230 } 231 double spanLon = b.getMaxLon() - minlon;229 maxlon += 360.0; 230 } 231 double spanLon = maxlon - b.getMinLon(); 232 232 double spanLat = b.getMaxLat() - b.getMinLat(); 233 233 … … 235 235 for (int step = 0; step < nPoints; step++) { 236 236 visitor.accept(latlon2eastNorth( 237 new LatLon(b.getMinLat(), minlon+ spanLon * step / nPoints)));238 } 239 for (int step = 0; step < nPoints; step++) { 240 visitor.accept(latlon2eastNorth( 241 new LatLon(b.getMinLat() + spanLat * step / nPoints, b.getMaxLon())));242 } 243 for (int step = 0; step < nPoints; step++) { 244 visitor.accept(latlon2eastNorth( 245 new LatLon(b.getMaxLat(), b.getMaxLon()- spanLon * step / nPoints)));246 } 247 for (int step = 0; step < nPoints; step++) { 248 visitor.accept(latlon2eastNorth( 249 new LatLon(b.getMaxLat() - spanLat * step / nPoints, minlon)));237 new LatLon(b.getMinLat(), b.getMinLon() + spanLon * step / nPoints))); 238 } 239 for (int step = 0; step < nPoints; step++) { 240 visitor.accept(latlon2eastNorth( 241 new LatLon(b.getMinLat() + spanLat * step / nPoints, maxlon))); 242 } 243 for (int step = 0; step < nPoints; step++) { 244 visitor.accept(latlon2eastNorth( 245 new LatLon(b.getMaxLat(), maxlon - spanLon * step / nPoints))); 246 } 247 for (int step = 0; step < nPoints; step++) { 248 visitor.accept(latlon2eastNorth( 249 new LatLon(b.getMaxLat() - spanLat * step / nPoints, b.getMinLon()))); 250 250 } 251 251 }
Note:
See TracChangeset
for help on using the changeset viewer.