source: josm/trunk/src/org/openstreetmap/josm/data/projection/BelgianLambert1972.java@ 5279

Last change on this file since 5279 was 5235, checked in by bastiK, 12 years ago

no rounding for projection bounds, to avoid 42 being dispayed as 41.99999999999

File size: 2.0 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.SevenParameterDatum;
9import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
10import org.openstreetmap.josm.data.projection.proj.ProjParameters;
11
12/**
13 * Belgian Lambert 72 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 BelgianLambert1972 extends AbstractProjection {
19
20 public BelgianLambert1972() {
21 ellps = Ellipsoid.hayford;
22 // 7 parameters transformation: http://www.eye4software.com/resources/datum/4313/
23 datum = new SevenParameterDatum("Belgium Datum 72", null, ellps, -99.06, 53.32, -112.49, 0.419, -0.830, 1.885, -1);
24 x_0 = 150000.013;
25 y_0 = 5400088.438;
26 lon_0 = convertDegreeMinuteSecond(4, 22, 2.952);
27 proj = new LambertConformalConic();
28 try {
29 proj.initialize(new ProjParameters() {{
30 ellps = BelgianLambert1972.this.ellps;
31 lat_0 = 90.0;
32 lat_1 = 49 + convertMinuteSecond(50, 0.00204);
33 lat_2 = 51 + convertMinuteSecond(10, 0.00204);
34 }});
35 } catch (ProjectionConfigurationException e) {
36 throw new RuntimeException(e);
37 }
38 }
39
40 @Override
41 public String getCacheDirectoryName() {
42 return "belgianLambert1972";
43 }
44
45 @Override
46 public Bounds getWorldBoundsLatLon() {
47 return new Bounds(
48 new LatLon(49.51, 2.54),
49 new LatLon(51.50, 6.40), false);
50 }
51
52 @Override
53 public Integer getEpsgCode() {
54 return 31370;
55 }
56
57 @Override
58 public String toString() {
59 return tr("Belgian Lambert 1972");
60 }
61}
Note: See TracBrowser for help on using the repository browser.