Changeset 3922 in josm for trunk/src/org/openstreetmap/josm/data/projection
 Timestamp:
 20110221T11:22:45+01:00 (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/org/openstreetmap/josm/data/projection/Mercator.java
r3205 r3922 22 22 public class Mercator implements Projection { 23 23 24 final double radius = 6378137.0; 25 24 26 public EastNorth latlon2eastNorth(LatLon p) { 25 27 return new EastNorth( 26 p.lon()*Math.PI/180 ,27 Math.log(Math.tan(Math.PI/4+p.lat()*Math.PI/360)) );28 p.lon()*Math.PI/180*radius, 29 Math.log(Math.tan(Math.PI/4+p.lat()*Math.PI/360))*radius); 28 30 } 29 31 30 32 public LatLon eastNorth2latlon(EastNorth p) { 31 33 return new LatLon( 32 Math.atan(Math.sinh(p.north() ))*180/Math.PI,33 p.east() *180/Math.PI);34 Math.atan(Math.sinh(p.north()/radius))*180/Math.PI, 35 p.east()/radius*180/Math.PI); 34 36 } 35 37 … … 60 62 public double getDefaultZoomInPPD() { 61 63 // This will set the scale bar to about 100 km 62 return 0.000158;64 return 1000.0;/*0.000158*/ 63 65 } 64 66 }
Note: See TracChangeset
for help on using the changeset viewer.