Last change
on this file since 4285 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. Copyright 2007 by Immanuel Scholz and others
|
---|
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.WGS84Datum;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Mercator Projection
|
---|
12 | *
|
---|
13 | * The center of the mercator projection is always the 0 grad
|
---|
14 | * coordinate.
|
---|
15 | *
|
---|
16 | * See also USGS Bulletin 1532
|
---|
17 | * (http://egsc.usgs.gov/isb/pubs/factsheets/fs08799.html)
|
---|
18 | *
|
---|
19 | * @author imi
|
---|
20 | */
|
---|
21 | public class Mercator extends AbstractProjection {
|
---|
22 |
|
---|
23 | public Mercator() {
|
---|
24 | ellps = Ellipsoid.WGS84;
|
---|
25 | datum = WGS84Datum.INSTANCE;
|
---|
26 | proj = new org.openstreetmap.josm.data.projection.proj.Mercator();
|
---|
27 | }
|
---|
28 |
|
---|
29 | @Override
|
---|
30 | public String toString() {
|
---|
31 | return tr("Mercator");
|
---|
32 | }
|
---|
33 |
|
---|
34 | @Override
|
---|
35 | public Integer getEpsgCode() {
|
---|
36 | /* initially they used 3785 but that has been superseded,
|
---|
37 | * see http://www.epsg-registry.org/ */
|
---|
38 | return 3857;
|
---|
39 | }
|
---|
40 |
|
---|
41 | @Override
|
---|
42 | public int hashCode() {
|
---|
43 | return getClass().getName().hashCode(); // we have no variables
|
---|
44 | }
|
---|
45 |
|
---|
46 | @Override
|
---|
47 | public String getCacheDirectoryName() {
|
---|
48 | return "mercator";
|
---|
49 | }
|
---|
50 |
|
---|
51 | @Override
|
---|
52 | public Bounds getWorldBoundsLatLon()
|
---|
53 | {
|
---|
54 | return new Bounds(
|
---|
55 | new LatLon(-85.05112877980659, -180.0),
|
---|
56 | new LatLon(85.05112877980659, 180.0));
|
---|
57 | }
|
---|
58 |
|
---|
59 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.