Last change
on this file since 5040 was 4285, checked in by bastiK, 13 years ago |
major projection rework
More modular structure, inspired by Proj.4.
There are almost no semantic changes to the projection algorithms. Mostly factors of 'a' and 180/PI have been moved from one place to the other. In UTM_France_DOM, the ellipsoid conversion for the first 3 projections has been changed from hayford <-> GRS80 to hayford <-> WGS84.
Some redundant algorithms have been removed. In particular:
- UTM_France_DOM used to have its own Transverse Mercator implementation. It is different from the implementation in TransverseMercator.java as it has another series expansion. For EPSG::2975, there are numeric differences on centimeter scale. However, the new data fits better with Proj.4 output.
- Also removed are alternate implementations of LambertConformalConic. (They are all quite similar, though.)
|
-
Property svn:eol-style
set to
native
|
File size:
1.4 KB
|
Line | |
---|
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 | import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
|
---|
9 | import org.openstreetmap.josm.data.projection.proj.TransverseMercator;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * SWEREF99 13 30 projection. Based on data from spatialreference.org.
|
---|
13 | * http://spatialreference.org/ref/epsg/3008/
|
---|
14 | *
|
---|
15 | * @author Hanno Hecker
|
---|
16 | */
|
---|
17 | public class Epsg3008 extends AbstractProjection {
|
---|
18 |
|
---|
19 | public Epsg3008() {
|
---|
20 | ellps = Ellipsoid.GRS80;
|
---|
21 | proj = new TransverseMercator(ellps);
|
---|
22 | datum = GRS80Datum.INSTANCE;
|
---|
23 | lon_0 = 13.5;
|
---|
24 | x_0 = 150000;
|
---|
25 | }
|
---|
26 |
|
---|
27 | @Override
|
---|
28 | public String toString() {
|
---|
29 | return tr("SWEREF99 13 30 / EPSG:3008 (Sweden)");
|
---|
30 | }
|
---|
31 |
|
---|
32 | @Override
|
---|
33 | public Integer getEpsgCode() {
|
---|
34 | return 3008;
|
---|
35 | }
|
---|
36 |
|
---|
37 | @Override
|
---|
38 | public int hashCode() {
|
---|
39 | return toCode().hashCode();
|
---|
40 | }
|
---|
41 |
|
---|
42 | @Override
|
---|
43 | public String getCacheDirectoryName() {
|
---|
44 | return "epsg"+ getEpsgCode();
|
---|
45 | }
|
---|
46 |
|
---|
47 | @Override
|
---|
48 | public Bounds getWorldBoundsLatLon() {
|
---|
49 | return new Bounds(
|
---|
50 | new LatLon(55.2, 12.1), // new LatLon(-90.0, -180.0),
|
---|
51 | new LatLon(62.26, 14.65)); // new LatLon(90.0, 180.0));
|
---|
52 | }
|
---|
53 |
|
---|
54 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.