1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.projection;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.data.Bounds;
|
---|
7 | import 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 | */
|
---|
15 | public 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("SWEREF99 13 30 / EPSG:3008 (Sweden)");
|
---|
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 | }
|
---|