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.GRS80Datum; 009 import org.openstreetmap.josm.data.projection.proj.LambertConformalConic; 010 import org.openstreetmap.josm.data.projection.proj.ProjParameters; 011 012 /** 013 * Belgian Lambert 2008 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 BelgianLambert2008 extends AbstractProjection { 019 020 public BelgianLambert2008() { 021 ellps = Ellipsoid.GRS80; 022 datum = GRS80Datum.INSTANCE; 023 x_0 = 649328.0; 024 y_0 = 665262.0; 025 lon_0 = convertDegreeMinuteSecond(4, 21, 33.177); 026 proj = new LambertConformalConic(); 027 try { 028 proj.initialize(new ProjParameters() {{ 029 ellps = BelgianLambert2008.this.ellps; 030 lat_0 = convertDegreeMinuteSecond(50, 47, 52.134); 031 lat_1 = convertDegreeMinuteSecond(49, 50, 0); 032 lat_2 = convertDegreeMinuteSecond(51, 10, 0); 033 }}); 034 } catch (ProjectionConfigurationException e) { 035 throw new RuntimeException(e); 036 } 037 } 038 039 @Override 040 public String getCacheDirectoryName() { 041 return "belgianLambert2008"; 042 } 043 044 @Override 045 public Bounds getWorldBoundsLatLon() { 046 return new Bounds( 047 new LatLon(49.51, 2.54), 048 new LatLon(51.50, 6.40), false); 049 } 050 051 @Override 052 public Integer getEpsgCode() { 053 return 3812; 054 } 055 056 @Override 057 public String toString() { 058 return tr("Belgian Lambert 2008"); 059 } 060 }