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 | * Belgian Lambert 2008 projection as specified by the Belgian IGN
|
---|
14 | * in this document: http://www.ngi.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf
|
---|
15 | * @author Don-vip
|
---|
16 | *
|
---|
17 | */
|
---|
18 | public class BelgianLambert2008 extends AbstractProjection {
|
---|
19 |
|
---|
20 | public BelgianLambert2008() {
|
---|
21 | ellps = Ellipsoid.GRS80;
|
---|
22 | datum = GRS80Datum.INSTANCE;
|
---|
23 | x_0 = 649328.0;
|
---|
24 | y_0 = 665262.0;
|
---|
25 | lon_0 = convertDegreeMinuteSecond(4, 21, 33.177);
|
---|
26 | proj = new LambertConformalConic();
|
---|
27 | try {
|
---|
28 | proj.initialize(new ProjParameters() {{
|
---|
29 | ellps = BelgianLambert2008.this.ellps;
|
---|
30 | lat_0 = convertDegreeMinuteSecond(50, 47, 52.134);
|
---|
31 | lat_1 = convertDegreeMinuteSecond(49, 50, 0);
|
---|
32 | lat_2 = convertDegreeMinuteSecond(51, 10, 0);
|
---|
33 | }});
|
---|
34 | } catch (ProjectionConfigurationException e) {
|
---|
35 | throw new RuntimeException(e);
|
---|
36 | }
|
---|
37 | }
|
---|
38 |
|
---|
39 | @Override
|
---|
40 | public String getCacheDirectoryName() {
|
---|
41 | return "belgianLambert2008";
|
---|
42 | }
|
---|
43 |
|
---|
44 | @Override
|
---|
45 | public Bounds getWorldBoundsLatLon() {
|
---|
46 | return new Bounds(
|
---|
47 | new LatLon(49.51, 2.54),
|
---|
48 | new LatLon(51.50, 6.40), false);
|
---|
49 | }
|
---|
50 |
|
---|
51 | @Override
|
---|
52 | public Integer getEpsgCode() {
|
---|
53 | return 3812;
|
---|
54 | }
|
---|
55 |
|
---|
56 | @Override
|
---|
57 | public String toString() {
|
---|
58 | return tr("Belgian Lambert 2008");
|
---|
59 | }
|
---|
60 | }
|
---|