1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.projection;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.data.Bounds;
|
---|
7 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
8 | import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
|
---|
9 | import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
|
---|
10 | import org.openstreetmap.josm.data.projection.proj.ProjParameters;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * Estonian Coordinate System of 1997.
|
---|
14 | *
|
---|
15 | * Thanks to Johan Montagnat and its geoconv java converter application
|
---|
16 | * (http://www.i3s.unice.fr/~johan/gps/ , published under GPL license)
|
---|
17 | * from which some code and constants have been reused here.
|
---|
18 | */
|
---|
19 | public class LambertEST extends AbstractProjection {
|
---|
20 |
|
---|
21 | public LambertEST() {
|
---|
22 | ellps = Ellipsoid.GRS80;
|
---|
23 | datum = GRS80Datum.INSTANCE;
|
---|
24 | lon_0 = 24;
|
---|
25 | x_0 = 500000;
|
---|
26 | y_0 = 6375000;
|
---|
27 | proj = new LambertConformalConic();
|
---|
28 | try {
|
---|
29 | proj.initialize(new ProjParameters() {{
|
---|
30 | ellps = LambertEST.this.ellps;
|
---|
31 | lat_0 = 57.517553930555555555555555555556;
|
---|
32 | lat_1 = 59.0 + 1.0/3.0;
|
---|
33 | lat_2 = 58.0;
|
---|
34 | }});
|
---|
35 | } catch (ProjectionConfigurationException e) {
|
---|
36 | throw new RuntimeException(e);
|
---|
37 | }
|
---|
38 | }
|
---|
39 |
|
---|
40 | @Override
|
---|
41 | public String toString() {
|
---|
42 | return tr("Lambert Zone (Estonia)");
|
---|
43 | }
|
---|
44 |
|
---|
45 | @Override
|
---|
46 | public Integer getEpsgCode() {
|
---|
47 | return 3301;
|
---|
48 | }
|
---|
49 |
|
---|
50 | @Override
|
---|
51 | public int hashCode() {
|
---|
52 | return getClass().getName().hashCode(); // we have no variables
|
---|
53 | }
|
---|
54 |
|
---|
55 | @Override
|
---|
56 | public String getCacheDirectoryName() {
|
---|
57 | return "lambertest";
|
---|
58 | }
|
---|
59 |
|
---|
60 | @Override
|
---|
61 | public Bounds getWorldBoundsLatLon()
|
---|
62 | {
|
---|
63 | return new Bounds(
|
---|
64 | new LatLon(56.05, 21.64),
|
---|
65 | new LatLon(61.13, 28.58));
|
---|
66 | }
|
---|
67 |
|
---|
68 | }
|
---|