source: josm/trunk/src/org/openstreetmap/josm/data/projection/Epsg3008.java@ 5073

Last change on this file since 5073 was 5066, checked in by bastiK, 12 years ago

Proj parameter refactoring (see #7495)

  • Property svn:eol-style set to native
File size: 1.7 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.GRS80Datum;
9import org.openstreetmap.josm.data.projection.proj.ProjParameters;
10import org.openstreetmap.josm.data.projection.proj.TransverseMercator;
11
12/**
13 * SWEREF99 13 30 projection. Based on data from spatialreference.org.
14 * http://spatialreference.org/ref/epsg/3008/
15 *
16 * @author Hanno Hecker
17 */
18public class Epsg3008 extends AbstractProjection {
19
20 public Epsg3008() {
21 ellps = Ellipsoid.GRS80;
22 proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator();
23 try {
24 proj.initialize(new ProjParameters() {{ ellps = Epsg3008.this.ellps; }});
25 } catch (ProjectionConfigurationException e) {
26 throw new RuntimeException(e);
27 }
28 datum = GRS80Datum.INSTANCE;
29 lon_0 = 13.5;
30 x_0 = 150000;
31 }
32
33 @Override
34 public String toString() {
35 return tr("SWEREF99 13 30 / EPSG:3008 (Sweden)");
36 }
37
38 @Override
39 public Integer getEpsgCode() {
40 return 3008;
41 }
42
43 @Override
44 public int hashCode() {
45 return toCode().hashCode();
46 }
47
48 @Override
49 public String getCacheDirectoryName() {
50 return "epsg"+ getEpsgCode();
51 }
52
53 @Override
54 public Bounds getWorldBoundsLatLon() {
55 return new Bounds(
56 new LatLon(55.2, 12.1), // new LatLon(-90.0, -180.0),
57 new LatLon(62.26, 14.65)); // new LatLon(90.0, 180.0));
58 }
59
60}
Note: See TracBrowser for help on using the repository browser.