001 // License: GPL. For details, see LICENSE file. 002 package org.openstreetmap.josm.data.projection; 003 004 import static org.openstreetmap.josm.tools.I18n.tr; 005 006 import org.openstreetmap.josm.data.Bounds; 007 import org.openstreetmap.josm.data.coor.LatLon; 008 import org.openstreetmap.josm.data.projection.datum.SevenParameterDatum; 009 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic; 010 import org.openstreetmap.josm.data.projection.proj.ProjParameters; 011 012 /** 013 * Belgian Lambert 72 projection as specified by the Belgian IGN 014 * in this document: http://www.ngi.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf 015 * @author Don-vip 016 * 017 */ 018 public class BelgianLambert1972 extends AbstractProjection { 019 020 public BelgianLambert1972() { 021 ellps = Ellipsoid.hayford; 022 // 7 parameters transformation: http://www.eye4software.com/resources/datum/4313/ 023 datum = new SevenParameterDatum("Belgium Datum 72", null, ellps, -99.06, 53.32, -112.49, 0.419, -0.830, 1.885, -1); 024 x_0 = 150000.013; 025 y_0 = 5400088.438; 026 lon_0 = convertDegreeMinuteSecond(4, 22, 2.952); 027 proj = new LambertConformalConic(); 028 try { 029 proj.initialize(new ProjParameters() {{ 030 ellps = BelgianLambert1972.this.ellps; 031 lat_0 = 90.0; 032 lat_1 = 49 + convertMinuteSecond(50, 0.00204); 033 lat_2 = 51 + convertMinuteSecond(10, 0.00204); 034 }}); 035 } catch (ProjectionConfigurationException e) { 036 throw new RuntimeException(e); 037 } 038 } 039 040 @Override 041 public String getCacheDirectoryName() { 042 return "belgianLambert1972"; 043 } 044 045 @Override 046 public Bounds getWorldBoundsLatLon() { 047 return new Bounds( 048 new LatLon(49.51, 2.54), 049 new LatLon(51.50, 6.40), false); 050 } 051 052 @Override 053 public Integer getEpsgCode() { 054 return 31370; 055 } 056 057 @Override 058 public String toString() { 059 return tr("Belgian Lambert 1972"); 060 } 061 }