Changeset 3343 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2010-06-26T21:00:05+02:00 (10 years ago)
Author:
stoecker
Message:

fix #5181 - changed french projections - patch by Pieren#

Location:
trunk/src/org/openstreetmap/josm/data/projection
Files:
2 edited

Legend:

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

    r3083 r3343  
    1919import org.openstreetmap.josm.data.coor.LatLon;
    2020import org.openstreetmap.josm.tools.GBC;
     21import org.openstreetmap.josm.tools.ImageProvider;
    2122
    2223/**
     
    262263        /* Note: we use component position 2 below to find this again */
    263264        p.add(prefcb, GBC.eop().fill(GBC.HORIZONTAL));
     265        p.add(new JLabel(ImageProvider.get("data/projection", "Departements_Lambert4Zones.png")), GBC.eol().fill(GBC.HORIZONTAL));
    264266        p.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH));
    265267    }
  • trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java

    r3168 r3343  
    2727    private static String MartiniqueName = tr("Martinique Fort Desaix 1952");
    2828    private static String Reunion92Name = tr("Reunion RGR92");
    29     public static String[] utmGeodesicsNames = { FortMarigotName, SainteAnneName, MartiniqueName, Reunion92Name};
     29    private static String Guyane92Name = tr("Guyane RGFG95");
     30    public static String[] utmGeodesicsNames = { FortMarigotName, SainteAnneName, MartiniqueName, Reunion92Name, Guyane92Name};
    3031
    3132    private Bounds FortMarigotBounds = new Bounds( new LatLon(17.6,-63.25), new LatLon(18.5,-62.5));
     
    3334    private Bounds MartiniqueBounds = new Bounds( new LatLon(14.25,-61.25), new LatLon(15.025,-60.725));
    3435    private Bounds ReunionBounds = new Bounds( new LatLon(-25.92,37.58), new LatLon(-10.6, 58.27));
    35     private Bounds[] utmBounds = { FortMarigotBounds, SainteAnneBounds, MartiniqueBounds, ReunionBounds};
     36    private Bounds GuyaneBounds = new Bounds( new LatLon(2.16 , -54.0), new LatLon(9.06 , -49.62));
     37    private Bounds[] utmBounds = { FortMarigotBounds, SainteAnneBounds, MartiniqueBounds, ReunionBounds, GuyaneBounds};
    3638
    3739    private String FortMarigotEPSG = "EPSG::2969";
     
    3941    private String MartiniqueEPSG = "EPSG::2973";
    4042    private String ReunionEPSG = "EPSG::2975";
    41     private String[] utmEPSGs = { FortMarigotEPSG, SainteAnneEPSG, MartiniqueEPSG, ReunionEPSG};
     43    private String GuyaneEPSG = "EPSG::2972";
     44    private String[] utmEPSGs = { FortMarigotEPSG, SainteAnneEPSG, MartiniqueEPSG, ReunionEPSG, GuyaneEPSG};
    4245
    4346    /**
     
    103106                    -32.3241E-6
    104107                    , false, 40);
     108        } else if (currentGeodesic == 4) { // UTM_22N_Guyane_RGFG95 (translation only required for re-projections from CSG67)
     109            set7ParametersTranslation(new double[]{-193.066 , 236.993, 105.447},
     110                    new double[]{0.4814, -0.8074,  0.1276},
     111                    1.5649E-6
     112                    , true, 22);
    105113        }
    106114    }
     
    120128
    121129    public EastNorth latlon2eastNorth(LatLon p) {
    122         if (currentGeodesic != 3) {
     130        if (currentGeodesic < 3 ) {
    123131            // translate ellipsoid GRS80 (WGS83) => reference ellipsoid geographic
    124132            LatLon geo = GRS802Hayford(p);
    125133            // reference ellipsoid geographic => UTM projection
    126134            return MTProjection(geo, Ellipsoid.hayford.a, Ellipsoid.hayford.e);
    127         } else { // UTM_40S_Reunion_RGR92
     135        } else { // UTM_40S_Reunion_RGR92 or UTM_22N_Guyane_RGFG95
    128136            LatLon geo = new LatLon(Math.toRadians(p.lat()), Math.toRadians(p.lon()));
    129137            return MTProjection(geo, Ellipsoid.GRS80.a, Ellipsoid.GRS80.e);
     
    233241
    234242    public LatLon eastNorth2latlon(EastNorth p) {
    235         if (currentGeodesic != 3) {
     243        if (currentGeodesic < 3) {
    236244            MTProjection(p.east(), p.north(), zone, isNorth);
    237245            LatLon geo = Geographic(p, Ellipsoid.hayford.a, Ellipsoid.hayford.e, 0.0 /* z */);
     
    248256            return new LatLon(Math.toDegrees(wgs.lat()), Math.toDegrees(wgs.lon()));
    249257        } else {
    250             // UTM_40S_Reunion_RGR92
     258            // UTM_40S_Reunion_RGR92 or UTM_22N_Guyane_RGFG95
    251259            LatLon geo = Geographic(p, Ellipsoid.GRS80.a, Ellipsoid.GRS80.e, 0.0 /* z */);
    252260            double N = Ellipsoid.GRS80.a / (Math.sqrt(1.0 - Ellipsoid.GRS80.e2 * Math.sin(geo.lat()) * Math.sin(geo.lat())));
     
    408416
    409417    @Override public String toString() {
    410         return (tr("UTM 20N (France)"));
     418        return (tr("UTM France (DOM)"));
    411419    }
    412420
     
    420428        prefcb.setSelectedIndex(currentGeodesic);
    421429        p.setLayout(new GridBagLayout());
    422         p.add(new JLabel(tr("UTM20 North Geodesic system")), GBC.std().insets(5,5,0,5));
     430        p.add(new JLabel(tr("UTM Geodesic system")), GBC.std().insets(5,5,0,5));
    423431        p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
    424432        p.add(prefcb, GBC.eop().fill(GBC.HORIZONTAL));
     
    449457                {
    450458                    currentGeodesic = Integer.parseInt(s)-1;
    451                     if(currentGeodesic < 0 || currentGeodesic > 3) {
     459                    if(currentGeodesic < 0 || currentGeodesic > 4) {
    452460                        currentGeodesic = DEFAULT_GEODESIC;
    453461                    }
Note: See TracChangeset for help on using the changeset viewer.