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

Last change on this file since 3690 was 3690, checked in by bastiK, 13 years ago

applied #5681 (patch by Hanno Hecker) add SWEREF99 / EPSG:3008 projection (some of it got accidentally committed in [3689]

  • Property svn:eol-style set to native
File size: 1.3 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;
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("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}
Note: See TracBrowser for help on using the repository browser.