001    package org.openstreetmap.josm.data.projection;
002    
003    import static org.openstreetmap.josm.tools.I18n.tr;
004    
005    import org.openstreetmap.josm.data.Bounds;
006    import org.openstreetmap.josm.data.coor.LatLon;
007    import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
008    import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
009    import org.openstreetmap.josm.data.projection.proj.ProjParameters;
010    
011    /**
012     * Lambert 93 projection as specified by the IGN
013     * in this document http://professionnels.ign.fr/DISPLAY/000/526/702/5267026/NTG_87.pdf
014     * @author Don-vip
015     *
016     */
017    public class Lambert93 extends AbstractProjection {
018    
019        public Lambert93() {
020            ellps = Ellipsoid.GRS80;
021            datum = GRS80Datum.INSTANCE;
022            x_0 =  700000;
023            y_0 = 6600000;
024            lon_0 = 3;
025            proj = new LambertConformalConic();
026            try {
027                proj.initialize(new ProjParameters() {{
028                    ellps = Lambert93.this.ellps;
029                    lat_0 = 46.50;
030                    lat_1 = 44.00;
031                    lat_2 = 49.00;
032                }});
033            } catch (ProjectionConfigurationException e) {
034                throw new RuntimeException(e);
035            }
036        }
037    
038        @Override
039        public String getCacheDirectoryName() {
040            return "lambert93";
041        }
042    
043        @Override
044        public Bounds getWorldBoundsLatLon() {
045            return new Bounds(
046                    new LatLon(41.0, -5.5),
047                    new LatLon(51.0, 10.2), false);
048        }
049    
050        @Override
051        public Integer getEpsgCode() {
052            return 2154;
053        }
054    
055        @Override
056        public String toString() {
057            return tr("Lambert 93 (France)");
058        }
059    }