Ignore:
Timestamp:
2012-03-10T16:18:23+01:00 (12 years ago)
Author:
bastiK
Message:

Proj parameter refactoring (see #7495)

File:
1 edited

Legend:

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

    r5022 r5066  
    77import org.openstreetmap.josm.data.projection.datum.SevenParameterDatum;
    88import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
     9import org.openstreetmap.josm.data.projection.proj.ProjParameters;
    910
    1011/**
    1112 * Belgian Lambert 72 projection as specified by the Belgian IGN
    1213 * in this document: http://www.ngi.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf
    13  * @author Don-vip 
     14 * @author Don-vip
    1415 *
    1516 */
     
    1920        ellps = Ellipsoid.hayford;
    2021        // 7 parameters transformation: http://www.eye4software.com/resources/datum/4313/
    21         datum = new SevenParameterDatum("Belgium Datum 72", null, Ellipsoid.hayford, -99.06, 53.32, -112.49, 0.419, -0.830, 1.885, -1);
     22        datum = new SevenParameterDatum("Belgium Datum 72", null, ellps, -99.06, 53.32, -112.49, 0.419, -0.830, 1.885, -1);
    2223        x_0 =  150000.013;
    2324        y_0 = 5400088.438;
    2425        lon_0 = convertDegreeMinuteSecond(4, 22, 2.952);
    25         double lat_0 = 90.0;
    26         double lat_1 = 49 + convertMinuteSecond(50, 0.00204);
    27         double lat_2 = 51 + convertMinuteSecond(10, 0.00204);
    2826        proj = new LambertConformalConic();
    29         ((LambertConformalConic)proj).updateParameters2SP(ellps, lat_0, lat_1, lat_2);
     27        try {
     28            proj.initialize(new ProjParameters() {{
     29                ellps = BelgianLambert1972.this.ellps;
     30                lat_0 = 90.0;
     31                lat_1 = 49 + convertMinuteSecond(50, 0.00204);
     32                lat_2 = 51 + convertMinuteSecond(10, 0.00204);
     33            }});
     34        } catch (ProjectionConfigurationException e) {
     35            throw new RuntimeException(e);
     36        }
    3037    }
    31    
     38
    3239    @Override
    3340    public String getCacheDirectoryName() {
     
    4653        return 31370;
    4754    }
    48    
     55
    4956    @Override
    5057    public String toString() {
Note: See TracChangeset for help on using the changeset viewer.