source: josm/trunk/src/org/openstreetmap/josm/data/projection/LambertEST.java@ 5039

Last change on this file since 5039 was 4285, checked in by bastiK, 13 years ago

major projection rework

More modular structure, inspired by Proj.4.

There are almost no semantic changes to the projection algorithms. Mostly factors of 'a' and 180/PI have been moved from one place to the other. In UTM_France_DOM, the ellipsoid conversion for the first 3 projections has been changed from hayford <-> GRS80 to hayford <-> WGS84.

Some redundant algorithms have been removed. In particular:

  • UTM_France_DOM used to have its own Transverse Mercator implementation. It is different from the implementation in TransverseMercator.java as it has another series expansion. For EPSG::2975, there are numeric differences on centimeter scale. However, the new data fits better with Proj.4 output.
  • Also removed are alternate implementations of LambertConformalConic. (They are all quite similar, though.)
  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.projection;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import org.openstreetmap.josm.data.Bounds;
7import org.openstreetmap.josm.data.coor.LatLon;
8import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
9import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
10
11/**
12 * Estonian Coordinate System of 1997.
13 *
14 * Thanks to Johan Montagnat and its geoconv java converter application
15 * (http://www.i3s.unice.fr/~johan/gps/ , published under GPL license)
16 * from which some code and constants have been reused here.
17 */
18public class LambertEST extends AbstractProjection {
19
20 public LambertEST() {
21 ellps = Ellipsoid.GRS80;
22 datum = GRS80Datum.INSTANCE;
23 lon_0 = 24;
24 double lat_0 = 57.517553930555555555555555555556;
25 double lat_1 = 59 + 1.0/3.0;
26 double lat_2 = 58;
27 x_0 = 500000;
28 y_0 = 6375000;
29 proj = new LambertConformalConic();
30 ((LambertConformalConic) proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
31 }
32
33 @Override
34 public String toString() {
35 return tr("Lambert Zone (Estonia)");
36 }
37
38 @Override
39 public Integer getEpsgCode() {
40 return 3301;
41 }
42
43 @Override
44 public int hashCode() {
45 return getClass().getName().hashCode(); // we have no variables
46 }
47
48 @Override
49 public String getCacheDirectoryName() {
50 return "lambertest";
51 }
52
53 @Override
54 public Bounds getWorldBoundsLatLon()
55 {
56 return new Bounds(
57 new LatLon(56.05, 21.64),
58 new LatLon(61.13, 28.58));
59 }
60
61}
Note: See TracBrowser for help on using the repository browser.