source: josm/trunk/src/org/openstreetmap/josm/data/projection/TransverseMercatorLV.java@ 4382

Last change on this file since 4382 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.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;
8import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
9
10/**
11 * LKS-92/ Latvia TM projection. Based on data from spatialreference.org.
12 * http://spatialreference.org/ref/epsg/3059/
13 *
14 * @author Viesturs Zarins
15 */
16public class TransverseMercatorLV extends AbstractProjection {
17
18 public TransverseMercatorLV() {
19 ellps = Ellipsoid.GRS80;
20 proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(ellps);
21 datum = GRS80Datum.INSTANCE;
22 lon_0 = 24;
23 x_0 = 500000;
24 y_0 = -6000000;
25 k_0 = 0.9996;
26 }
27
28 @Override
29 public String toString() {
30 return tr("LKS-92 (Latvia TM)");
31 }
32
33 @Override
34 public Integer getEpsgCode() {
35 return 3059;
36 }
37
38 @Override
39 public int hashCode() {
40 return toCode().hashCode();
41 }
42
43 @Override
44 public String getCacheDirectoryName() {
45 return "epsg"+ getEpsgCode();
46 }
47
48 @Override
49 public Bounds getWorldBoundsLatLon() {
50 return new Bounds(
51 new LatLon(-90.0, -180.0),
52 new LatLon(90.0, 180.0));
53 }
54}
Note: See TracBrowser for help on using the repository browser.