Changeset 28384 in osm for applications


Ignore:
Timestamp:
2012-05-13T13:17:04+02:00 (12 years ago)
Author:
donvip
Message:

[josm_opendata] Update to JOSM 5236

Location:
applications/editors/josm/plugins/opendata
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/build.xml

    r28296 r28384  
    2828    <property name="commit.message" value="Commit message"/>
    2929    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    30     <property name="plugin.main.version" value="5132"/>
     30    <property name="plugin.main.version" value="5236"/>
    3131    <!-- should not be necessary to change the following properties -->
    3232    <property name="josm" location="../../core/dist/josm-custom.jar"/>
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchDataSetHandler.java

    r28113 r28384  
    2020import java.net.MalformedURLException;
    2121import java.net.URL;
    22 import java.util.Arrays;
    2322import java.util.regex.Matcher;
    2423import java.util.regex.Pattern;
     
    4241
    4342        protected static final Projection lambert93 = PRJ_LAMBERT_93.getProjection(); // France metropolitaine
    44         protected static final UTM utm20 = new UTM(20, Hemisphere.North, false); // Guadeloupe, Martinique
    45         protected static final UTM utm22 = new UTM(22, Hemisphere.North, false); // Guyane
    46         protected static final UTM utm38 = new UTM(38, Hemisphere.South, false); // Mayotte
    47         protected static final UTM utm40 = new UTM(40, Hemisphere.South, false); // Reunion
     43        protected static final UTM utm20 = new UTM(20, Hemisphere.North); // Guadeloupe, Martinique
     44        protected static final UTM utm22 = new UTM(22, Hemisphere.North); // Guyane
     45        protected static final UTM utm38 = new UTM(38, Hemisphere.South); // Mayotte
     46        protected static final UTM utm40 = new UTM(40, Hemisphere.South); // Reunion
    4847       
    4948        protected static final Lambert[] lambert4Zones = new Lambert[4];
    5049        static {
    5150                for (int i=0; i<lambert4Zones.length; i++) {
    52                         lambert4Zones[i] = new Lambert();
    53                         lambert4Zones[i].setPreferences(Arrays.asList(Integer.toString(i+1)));
     51                        lambert4Zones[i] = new Lambert(i);
    5452                }
    5553        }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/ProjectionChooser.java

    r28000 r28384  
    2727
    2828import org.openstreetmap.josm.data.projection.Projection;
    29 import org.openstreetmap.josm.data.projection.Projections;
    3029import org.openstreetmap.josm.gui.ExtendedDialog;
     30import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice;
     31import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    3132import org.openstreetmap.josm.tools.GBC;
    3233
     
    4243     * Combobox with all projections available
    4344     */
    44     private final JComboBox projectionCombo = new JComboBox(Projections.getProjections().toArray());
     45    private final JComboBox projectionCombo = new JComboBox(ProjectionPreference.getProjectionChoices().toArray());
    4546
    4647        public ProjectionChooser(Component parent) {
     
    6465       
    6566        public Projection getProjection() {
    66                 return (Projection) projectionCombo.getSelectedItem();
     67                ProjectionChoice choice = (ProjectionChoice) projectionCombo.getSelectedItem();
     68                return choice != null ? choice.getProjection() : null;
    6769        }
    6870}
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultShpHandler.java

    r28191 r28384  
    4040import org.openstreetmap.josm.data.projection.Ellipsoid;
    4141import org.openstreetmap.josm.data.projection.Projection;
    42 import org.openstreetmap.josm.data.projection.Projections;
    4342import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
    4443import org.openstreetmap.josm.data.projection.proj.LambertConformalConic.Parameters;
    4544import org.openstreetmap.josm.data.projection.proj.LambertConformalConic.Parameters1SP;
    4645import org.openstreetmap.josm.data.projection.proj.LambertConformalConic.Parameters2SP;
     46import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice;
     47import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    4748import org.openstreetmap.josm.plugins.opendata.core.OdConstants;
    4849import org.openstreetmap.josm.tools.Pair;
     
    8384                                LambertConformal lambert = (LambertConformal) transform;
    8485                                GeodeticDatum geo = (GeodeticDatum) crs.getDatum();
    85                                 for (Projection p : Projections.getProjections()) {
     86                                for (ProjectionChoice choice : ProjectionPreference.getProjectionChoices()) {
     87                                        Projection p = choice.getProjection();
    8688                                        if (p instanceof AbstractProjection) {
    8789                                                AbstractProjection ap = (AbstractProjection) p;
Note: See TracChangeset for help on using the changeset viewer.