Ticket #3084: Lambert.patch
File Lambert.patch, 2.2 KB (added by , 16 years ago) |
---|
-
Lambert.java
12 12 import org.openstreetmap.josm.data.coor.EastNorth; 13 13 import org.openstreetmap.josm.data.coor.LatLon; 14 14 import org.openstreetmap.josm.data.Bounds; 15 import org.openstreetmap.josm.data.ProjectionBounds;16 15 17 16 public class Lambert implements Projection { 18 17 /** … … 69 68 70 69 private static int currentZone = 0; 71 70 72 private static boolean dontDisplayErrors = false;73 74 71 /** 75 72 * @param p WGS84 lat/lon (ellipsoid GRS80) (in degree) 76 73 * @return eastnorth projection in Lambert Zone (ellipsoid Clark) … … 109 106 if (!outOfLambertZones) { 110 107 if (layoutZone == -1) { 111 108 layoutZone = currentZone; 112 dontDisplayErrors = false;113 109 } else if (layoutZone != currentZone) { 114 110 if ((currentZone < layoutZone && Math.abs(zoneLimits[currentZone] - lt) > cMaxOverlappingZones) 115 111 || (currentZone > layoutZone && Math.abs(zoneLimits[layoutZone] - lt) > cMaxOverlappingZones)) { … … 120 116 + "Undo your last action, save your work\n" 121 117 + "and start a new layer on the new zone.")); 122 118 layoutZone = -1; 123 dontDisplayErrors = true;124 119 } else { 125 120 System.out.println("temporarily extend Lambert zone " + layoutZone + " projection at lat,lon:" 126 121 + lt + "," + lg); 127 122 } 128 123 } 129 124 } 130 if (layoutZone == -1) {125 if (layoutZone == -1) 131 126 return ConicProjection(lt, lg, Xs[currentZone], Ys[currentZone], c[currentZone], n[currentZone]); 132 } // else133 127 return ConicProjection(lt, lg, Xs[layoutZone], Ys[layoutZone], c[layoutZone], n[layoutZone]); 134 128 } 135 129 … … 279 273 public Bounds getWorldBoundsLatLon() 280 274 { 281 275 return new Bounds( 282 new LatLon(-90.0, -180.0),283 new LatLon(90.0, 180.0));276 new LatLon(45.0, -4.9074074074074059), 277 new LatLon(57.0, 10.2)); 284 278 } 285 279 }