Ignore:
Timestamp:
2012-11-03T10:48:32+01:00 (12 years ago)
Author:
bastik
Message:

update to latest josm (2)

Location:
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java

    r28364 r28891  
    2222
    2323import org.openstreetmap.josm.actions.ExtensionFileFilter;
    24 import org.openstreetmap.josm.data.projection.BelgianLambert1972;
    25 import org.openstreetmap.josm.data.projection.BelgianLambert2008;
    26 import org.openstreetmap.josm.data.projection.Epsg4326;
    27 import org.openstreetmap.josm.data.projection.Lambert93;
     24import org.openstreetmap.josm.data.projection.Projections;
    2825import org.openstreetmap.josm.plugins.opendata.core.io.LambertCC9ZonesProjectionPatterns;
    2926import org.openstreetmap.josm.plugins.opendata.core.io.ProjectionPatterns;
     
    136133   
    137134    public static final ProjectionPatterns PRJ_UNKNOWN = new ProjectionPatterns("");
    138     public static final ProjectionPatterns PRJ_WGS84 = new ProjectionPatterns("GPS|WGS84|°décimaux", new Epsg4326());
    139     public static final ProjectionPatterns PRJ_LAMBERT_93 = new ProjectionPatterns("LAMB93|L93", new Lambert93());
     135    public static final ProjectionPatterns PRJ_WGS84 = new ProjectionPatterns("GPS|WGS84|°décimaux", Projections.getProjectionByCode("EPSG:4326"));
     136    public static final ProjectionPatterns PRJ_LAMBERT_93 = new ProjectionPatterns("LAMB93|L93", Projections.getProjectionByCode("EPSG:2154"));
    140137    public static final ProjectionPatterns PRJ_LAMBERT_CC_9_ZONES = new LambertCC9ZonesProjectionPatterns("LAMBZ|CC(42|43|44|45|46|47|48|49|50)");
    141138
    142     public static final ProjectionPatterns PRJ_LAMBERT_1972 = new ProjectionPatterns("LAMB72|LAMB1972", new BelgianLambert1972());
    143     public static final ProjectionPatterns PRJ_LAMBERT_2008 = new ProjectionPatterns("LAMB08|LAMB2008", new BelgianLambert2008());
     139    public static final ProjectionPatterns PRJ_LAMBERT_1972 = new ProjectionPatterns("LAMB72|LAMB1972", Projections.getProjectionByCode("EPSG:31370"));
     140    public static final ProjectionPatterns PRJ_LAMBERT_2008 = new ProjectionPatterns("LAMB08|LAMB2008", Projections.getProjectionByCode("EPSG:3812"));
    144141
    145142    /**
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchDataSetHandler.java

    r28384 r28891  
    2727import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2828import org.openstreetmap.josm.data.osm.Tag;
    29 import org.openstreetmap.josm.data.projection.Lambert;
    3029import org.openstreetmap.josm.data.projection.Projection;
    31 import org.openstreetmap.josm.data.projection.UTM;
    32 import org.openstreetmap.josm.data.projection.UTM.Hemisphere;
     30import org.openstreetmap.josm.data.projection.Projections;
    3331import org.openstreetmap.josm.plugins.opendata.core.datasets.SimpleDataSetHandler;
    3432import org.openstreetmap.josm.plugins.opendata.core.io.tabular.DefaultCsvHandler;
     
    4139
    4240        protected static final Projection lambert93 = PRJ_LAMBERT_93.getProjection(); // France metropolitaine
    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
    47        
    48         protected static final Lambert[] lambert4Zones = new Lambert[4];
     41        protected static final Projection utm20 = Projections.getProjectionByCode("EPSG:32620"); // UTM 20 N - Guadeloupe, Martinique
     42        protected static final Projection utm22 = Projections.getProjectionByCode("EPSG:32622"); // UTM 22 N - Guyane
     43        protected static final Projection utm38 = Projections.getProjectionByCode("EPSG:32738"); // UTM 38 S - Mayotte
     44        protected static final Projection utm40 = Projections.getProjectionByCode("EPSG:32740"); // UTM 40 S - Reunion
     45       
     46        protected static final Projection[] lambert4Zones = new Projection[4];
    4947        static {
    5048                for (int i=0; i<lambert4Zones.length; i++) {
    51                         lambert4Zones[i] = new Lambert(i);
     49                        lambert4Zones[i] = Projections.getProjectionByCode("EPSG:"+Integer.toString(27561+i));
    5250                }
    5351        }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/LambertCC9ZonesProjectionPatterns.java

    r28000 r28891  
    55import java.util.regex.Matcher;
    66
    7 import org.openstreetmap.josm.data.projection.LambertCC9Zones;
    87import org.openstreetmap.josm.data.projection.Projection;
     8import org.openstreetmap.josm.data.projection.Projections;
    99
    1010public class LambertCC9ZonesProjectionPatterns extends ProjectionPatterns {
    1111       
    12         public static final LambertCC9Zones[] lambertCC9Zones = new LambertCC9Zones[9];
     12        public static final Projection[] lambertCC9Zones = new Projection[9];
    1313        static {
    1414                for (int i=0; i<lambertCC9Zones.length; i++) {
    15                         lambertCC9Zones[i] = new LambertCC9Zones(i);
     15                        lambertCC9Zones[i] = Projections.getProjectionByCode("EPSG:"+Integer.toString(3942+i));
    1616                }
    1717        }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReader.java

    r28000 r28891  
    3636import org.openstreetmap.josm.data.osm.RelationMember;
    3737import org.openstreetmap.josm.data.osm.Way;
    38 import org.openstreetmap.josm.data.projection.Epsg4326;
    39 import org.openstreetmap.josm.data.projection.Lambert93;
    40 import org.openstreetmap.josm.data.projection.LambertCC9Zones;
    4138import org.openstreetmap.josm.data.projection.Projection;
     39import org.openstreetmap.josm.data.projection.Projections;
    4240import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    4341import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
     
    123121
    124122                        if (proj == Longitude_Latitude) {
    125                                 josmProj = new Epsg4326();
     123                                josmProj = Projections.getProjectionByCode("EPSG:4326"); // WGS 84
    126124                                return;
    127125                        }
     
    238236                                        // This sounds good for Lambert 93 or Lambert CC 9
    239237                                        if (equals(originLat, 46.5) && equals(stdP1, 44.0) && equals(stdP2, 49.0) && equals(falseEasting, 700000.0) && equals(falseNorthing, 6600000.0)) {
    240                                                 josmProj = new Lambert93();
     238                                                josmProj = Projections.getProjectionByCode("EPSG:2154"); // Lambert 93
    241239                                        } else if (equals(falseEasting, 1700000.0)) {
    242240                                                for (int i=0; josmProj == null && i<9; i++) {
    243241                                                        if (equals(originLat, 42.0+i) && equals(stdP1, 41.25+i) && equals(stdP2, 42.75+i) && equals(falseNorthing, (i+1)*1000000.0 + 200000.0)) {
    244                                                                 josmProj = new LambertCC9Zones(i);
     242                                                                josmProj = Projections.getProjectionByCode("EPSG:"+Integer.toString(3942 + i)); // LambertCC9Zones
    245243                                                        }
    246244                                                }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/SpreadSheetReader.java

    r28364 r28891  
    3232import org.openstreetmap.josm.data.osm.DataSet;
    3333import org.openstreetmap.josm.data.osm.Node;
    34 import org.openstreetmap.josm.data.projection.LambertCC9Zones;
    3534import org.openstreetmap.josm.data.projection.Projection;
    3635import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    4544        private static final NumberFormat formatUK = NumberFormat.getInstance(Locale.UK);
    4645       
    47         protected static final LambertCC9Zones[] projLambCC9Zones = new LambertCC9Zones[9];
    48         static {
    49                 for (int i=0; i<projLambCC9Zones.length; i++) {
    50                         projLambCC9Zones[i] = new LambertCC9Zones(i);
    51                 }
    52         }
    53 
    5446        protected final SpreadSheetHandler handler;
    5547
Note: See TracChangeset for help on using the changeset viewer.