Changeset 1722 in josm for trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
- Timestamp:
- 2009-07-03T12:33:32+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
r1583 r1722 12 12 import org.openstreetmap.josm.data.coor.EastNorth; 13 13 import org.openstreetmap.josm.data.coor.LatLon; 14 import org.openstreetmap.josm.data.Bounds; 15 import org.openstreetmap.josm.data.ProjectionBounds; 14 16 15 17 public class Lambert implements Projection { … … 104 106 } else { 105 107 outOfLambertZones = true; // possible when MAX_LAT is used 106 if (p.lat() != 0 && Math.abs(p.lat()) != Projection.MAX_LAT107 && p.lon() != 0 && Math.abs(p.lon()) != Projection.MAX_LON108 && dontDisplayErrors == false) {109 JOptionPane.showMessageDialog(Main.parent,110 tr("The projection \"{0}\" is designed for\n"111 + "latitudes between 46.1\u00b0 and 57\u00b0 only.\n"112 + "Use another projection system if you are not using\n"113 + "a French WMS server.\n"114 + "Do not upload any data after this message.", this.toString()));115 dontDisplayErrors = true;116 }117 108 } 118 109 if (!outOfLambertZones) { … … 167 158 } 168 159 169 public double scaleFactor() {170 return 1.0 / 360;171 }172 173 160 @Override 174 161 public boolean equals(Object o) { 175 162 return o instanceof Lambert; 176 }177 178 @Override179 public int hashCode() {180 return Lambert.class.hashCode();181 163 } 182 164 … … 300 282 } 301 283 284 public ProjectionBounds getWorldBounds() 285 { 286 Bounds b = getWorldBoundsLatLon(); 287 return new ProjectionBounds(latlon2eastNorth(b.min), latlon2eastNorth(b.max)); 288 } 289 290 public Bounds getWorldBoundsLatLon() 291 { 292 return new Bounds( 293 new LatLon(-90.0, -180.0), 294 new LatLon(90.0, 180.0)); 295 } 302 296 }
Note:
See TracChangeset
for help on using the changeset viewer.