Ignore:
Timestamp:
2011-08-07T12:17:39+02:00 (13 years ago)
Author:
bastiK
Message:

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.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/TransverseMercatorLV.java

    r3635 r4285  
    66import org.openstreetmap.josm.data.Bounds;
    77import org.openstreetmap.josm.data.coor.LatLon;
     8import org.openstreetmap.josm.data.projection.datum.GRS80Datum;
    89
    910/**
     
    1314 * @author Viesturs Zarins
    1415 */
    15 public class TransverseMercatorLV extends TransverseMercator {
     16public class TransverseMercatorLV extends AbstractProjection {
    1617
    17     public TransverseMercatorLV()
    18     {
    19         setProjectionParameters(24, 500000, -6000000);
     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;
    2026    }
    21 
    22     @Override public String toString() {
     27   
     28    @Override
     29    public String toString() {
    2330        return tr("LKS-92 (Latvia TM)");
    2431    }
    2532
    26     private int epsgCode() {
     33    @Override
     34    public Integer getEpsgCode() {
    2735        return 3059;
    28     }
    29 
    30     @Override
    31     public String toCode() {
    32         return "EPSG:"+ epsgCode();
    3336    }
    3437
     
    3841    }
    3942
     43    @Override
    4044    public String getCacheDirectoryName() {
    41         return "epsg"+ epsgCode();
     45        return "epsg"+ getEpsgCode();
    4246    }
    4347
Note: See TracChangeset for help on using the changeset viewer.