Changeset 2114 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2009-09-13T13:12:14+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/projection
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/Epsg4326.java
r2017 r2114 38 38 { 39 39 return new Bounds( 40 new LatLon(-90.0, -180.0), 41 new LatLon(90.0, 180.0)); 40 new LatLon(-90.0, -180.0), 41 new LatLon(90.0, 180.0)); 42 } 43 44 public double getDefaultZoomInPPD() { 45 // This will set the scale bar to about 100 km 46 return 0.009; 42 47 } 43 48 } -
trunk/src/org/openstreetmap/josm/data/projection/GaussLaborde_Reunion.java
r1929 r2114 216 216 } 217 217 218 public double getDefaultZoomInPPD() { 219 // this will set the map scaler to about 1000 m 220 return 10.02; 221 } 218 222 } -
trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
r2017 r2114 289 289 new LatLon(57.0, 10.2));*/ 290 290 } 291 292 public double getDefaultZoomInPPD() { 293 // TODO FIXME 294 return 0; 295 } 291 296 } -
trunk/src/org/openstreetmap/josm/data/projection/LambertEST.java
r2017 r2114 48 48 double t = Math.tan(Math.PI / 4.0 - Math.toRadians(p.lat()) / 2.0) 49 49 / Math.pow(( (1.0 - ee * Math.sin(Math.toRadians(p.lat()))) / (1.0 50 + ee * Math.sin(Math.toRadians(p.lat())))) ,(ee / 2.0)); 50 + ee * Math.sin(Math.toRadians(p.lat())))) ,(ee / 2.0)); 51 51 double r = a * f * Math.pow(t, n); 52 52 double theta = n * (Math.toRadians(p.lon()) - lonf); … … 64 64 double a = 1.5707963267948966; 65 65 double b = 1.5707963267948966 - (2.0 * Math.atan(t * Math.pow((1.0 66 - (e * Math.sin(a))) / (1.0 + (e * Math.sin(a))), e / 2.0))); 66 - (e * Math.sin(a))) / (1.0 + (e * Math.sin(a))), e / 2.0))); 67 67 while (Math.abs(a-b) > epsilon) 68 68 { 69 69 a = a1 + ((a2 - a1) / 2.0); 70 70 b = 1.5707963267948966 - (2.0 * Math.atan(t * Math.pow((1.0 71 - (e * Math.sin(a))) / (1.0 + (e * Math.sin(a))), e / 2.0))); 71 - (e * Math.sin(a))) / (1.0 + (e * Math.sin(a))), e / 2.0))); 72 72 if (a1 == a2) 73 {74 73 return 0.0; 74 if (b > a) { 75 a1 = a; 76 } else { 77 a2 = a; 75 78 } 76 if (b > a)77 a1 = a;78 else79 a2 = a;80 79 } 81 80 return b; … … 85 84 { 86 85 double r = Math.sqrt(Math.pow((p.getX() - ef), 2.0) + Math.pow((rf 87 - p.getY() + nf), 2.0) ) * Math.signum(n); 86 - p.getY() + nf), 2.0) ) * Math.signum(n); 88 87 double T = Math.pow((r / (a * f)), (1.0/ n)) ; 89 88 double theta = Math.atan((p.getX() - ef) / (rf - p.getY() + nf)); … … 109 108 { 110 109 return new Bounds( 111 new LatLon(-90.0, -180.0), 112 new LatLon(90.0, 180.0)); 110 new LatLon(-90.0, -180.0), 111 new LatLon(90.0, 180.0)); 112 } 113 114 public double getDefaultZoomInPPD() { 115 // TODO FIXME 116 return 0; 113 117 } 114 118 } -
trunk/src/org/openstreetmap/josm/data/projection/Mercator.java
r2017 r2114 24 24 public EastNorth latlon2eastNorth(LatLon p) { 25 25 return new EastNorth( 26 p.lon()*Math.PI/180, 27 Math.log(Math.tan(Math.PI/4+p.lat()*Math.PI/360))); 26 p.lon()*Math.PI/180, 27 Math.log(Math.tan(Math.PI/4+p.lat()*Math.PI/360))); 28 28 } 29 29 30 30 public LatLon eastNorth2latlon(EastNorth p) { 31 31 return new LatLon( 32 Math.atan(Math.sinh(p.north()))*180/Math.PI, 33 p.east()*180/Math.PI); 32 Math.atan(Math.sinh(p.north()))*180/Math.PI, 33 p.east()*180/Math.PI); 34 34 } 35 35 … … 49 49 { 50 50 return new Bounds( 51 new LatLon(-85.05112877980659, -180.0), 52 new LatLon(85.05112877980659, 180.0)); 51 new LatLon(-85.05112877980659, -180.0), 52 new LatLon(85.05112877980659, 180.0)); 53 } 54 55 public double getDefaultZoomInPPD() { 56 // This will set the scale bar to about 100 km 57 return 0.000158; 53 58 } 54 59 } -
trunk/src/org/openstreetmap/josm/data/projection/Projection.java
r2017 r2114 24 24 new Epsg4326(), 25 25 new Mercator(), 26 new LambertEST(), 27 new Lambert(), 26 new LambertEST(), // Still needs proper default zoom 27 new Lambert(), // Still needs proper default zoom 28 28 new SwissGrid(), 29 29 new UTM(), … … 33 33 new GaussLaborde_Reunion() 34 34 }; 35 36 /** 37 * Returns the default zoom scale in pixel per degree ({@see #NavigatableComponent#scale})) 38 */ 39 double getDefaultZoomInPPD(); 35 40 36 41 /** -
trunk/src/org/openstreetmap/josm/data/projection/SwissGrid.java
r2017 r2114 102 102 { 103 103 return new Bounds( 104 new LatLon(45.7, 5.7), 105 new LatLon(47.9, 10.6)); 104 new LatLon(45.7, 5.7), 105 new LatLon(47.9, 10.6)); 106 } 107 108 public double getDefaultZoomInPPD() { 109 // This will set the scale bar to about 100 m 110 return 1.01; 106 111 } 107 112 } -
trunk/src/org/openstreetmap/josm/data/projection/UTM.java
r2017 r2114 342 342 public int getzone() 343 343 { 344 return 33; 344 return 33; 345 345 } 346 346 … … 356 356 { 357 357 return new Bounds( 358 new LatLon(-85.0, UTMCentralMeridianDeg(getzone())-5.0), 359 new LatLon(85.0, UTMCentralMeridianDeg(getzone())+5.0)); 358 new LatLon(-85.0, UTMCentralMeridianDeg(getzone())-5.0), 359 new LatLon(85.0, UTMCentralMeridianDeg(getzone())+5.0)); 360 } 361 362 public double getDefaultZoomInPPD() { 363 // this will set the map scaler to about 1000 m 364 return 10; 360 365 } 361 366 } -
trunk/src/org/openstreetmap/josm/data/projection/UTM_20N_Guadeloupe_Fort_Marigot.java
r1929 r2114 36 36 } 37 37 38 public double getDefaultZoomInPPD() { 39 // this will set the map scaler to about 1000 m 40 return 10; 41 } 38 42 } -
trunk/src/org/openstreetmap/josm/data/projection/UTM_20N_Guadeloupe_Ste_Anne.java
r1977 r2114 36 36 } 37 37 38 public double getDefaultZoomInPPD() { 39 // this will set the map scaler to about 1000 m 40 return 10.01; 41 } 38 42 } -
trunk/src/org/openstreetmap/josm/data/projection/UTM_20N_Martinique_Fort_Desaix.java
r1929 r2114 35 35 return tr("UTM20N Martinique Fort Desaix 1952"); 36 36 } 37 38 public double getDefaultZoomInPPD() { 39 // this will set the map scaler to about 1000 m 40 return 10.01; 41 } 37 42 }
Note:
See TracChangeset
for help on using the changeset viewer.