Changeset 3692 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-12-03T14:45:14+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/Epsg3008.java
r3690 r3692 6 6 import org.openstreetmap.josm.data.Bounds; 7 7 import org.openstreetmap.josm.data.coor.LatLon; 8 import org.openstreetmap.josm.data.coor.EastNorth; 8 9 9 10 /** … … 16 17 17 18 private final static double UTMScaleFactor = 1.0; 19 private double UTMCentralMeridianRad; 20 private double offsetEastMeters = 150000; 21 private double offsetNorthMeters = 0; 18 22 19 23 public Epsg3008() 20 24 { 21 setProjectionParameters(13.5, 150000, 0);25 UTMCentralMeridianRad = Math.toRadians(13.5); 22 26 } 23 27 … … 50 54 new LatLon(62.26, 14.65)); // new LatLon(90.0, 180.0)); 51 55 } 56 57 @Override 58 public EastNorth latlon2eastNorth(LatLon p) { 59 EastNorth a = mapLatLonToXY(Math.toRadians(p.lat()), Math.toRadians(p.lon()), UTMCentralMeridianRad); 60 return new EastNorth(a.east() * UTMScaleFactor + offsetEastMeters, a.north() * UTMScaleFactor + offsetNorthMeters); 61 } 62 63 @Override 64 public LatLon eastNorth2latlon(EastNorth p) { 65 return mapXYToLatLon((p.east() - offsetEastMeters)/UTMScaleFactor, (p.north() - offsetNorthMeters)/UTMScaleFactor, UTMCentralMeridianRad); 66 } 67 52 68 }
Note:
See TracChangeset
for help on using the changeset viewer.