Ticket #5681: EPSG3008.diff

File EPSG3008.diff, 2.1 KB (added by anonymous, 2 years ago)
  • src/org/openstreetmap/josm/data/projection/Epsg3008.java

     
     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; 
     8 
     9/** 
     10 * SWEREF99 13 30 projection. Based on data from spatialreference.org. 
     11 * http://spatialreference.org/ref/epsg/3008/ 
     12 * 
     13 * @author Hanno Hecker, based on the TransverseMercatorLV.java by Viesturs Zarins 
     14 */ 
     15public class Epsg3008 extends TransverseMercator { 
     16 
     17    private final static double UTMScaleFactor = 1.0; 
     18 
     19    public Epsg3008() 
     20    { 
     21        setProjectionParameters(13.5, 150000, 0); 
     22    } 
     23 
     24    @Override public String toString() { 
     25        return tr("EPSG:3008 (SWEREF99 13 30)"); 
     26    } 
     27 
     28    private int epsgCode() { 
     29        return 3008; 
     30    } 
     31 
     32    @Override 
     33    public String toCode() { 
     34        return "EPSG:"+ epsgCode(); 
     35    } 
     36 
     37    @Override 
     38    public int hashCode() { 
     39        return toCode().hashCode(); 
     40    } 
     41 
     42    public String getCacheDirectoryName() { 
     43        return "epsg"+ epsgCode(); 
     44    } 
     45 
     46    @Override 
     47    public Bounds getWorldBoundsLatLon() { 
     48        return new Bounds( 
     49                new LatLon(55.2, 12.1),     // new LatLon(-90.0, -180.0), 
     50                new LatLon(62.26, 14.65));  // new LatLon(90.0, 180.0)); 
     51    } 
     52} 
  • src/org/openstreetmap/josm/data/projection/Projection.java

     
    2727        new UTM_France_DOM(), 
    2828        new TransverseMercatorLV(), 
    2929        new Puwg(), 
     30        new Epsg3008(), // SWEREF99 13 30 
    3031        new SwissGrid(), 
    3132    }; 
    3233