source: josm/trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert2008.java@ 5232

Last change on this file since 5232 was 5072, checked in by bastiK, 12 years ago

basic support for custom projections (see #7495)

File size: 1.9 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;
10import 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 */
18public 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));
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}
Note: See TracBrowser for help on using the repository browser.