Changeset 28891 in osm for applications/editors/josm/plugins/opendata
- Timestamp:
- 2012-11-03T10:48:32+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/build.xml
r28696 r28891 28 28 <property name="commit.message" value="Commit message"/> 29 29 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 30 <property name="plugin.main.version" value="5 236"/>30 <property name="plugin.main.version" value="5554"/> 31 31 <!-- should not be necessary to change the following properties --> 32 32 <property name="josm" location="../../core/dist/josm-custom.jar"/> -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java
r28364 r28891 22 22 23 23 import 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; 24 import org.openstreetmap.josm.data.projection.Projections; 28 25 import org.openstreetmap.josm.plugins.opendata.core.io.LambertCC9ZonesProjectionPatterns; 29 26 import org.openstreetmap.josm.plugins.opendata.core.io.ProjectionPatterns; … … 136 133 137 134 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")); 140 137 public static final ProjectionPatterns PRJ_LAMBERT_CC_9_ZONES = new LambertCC9ZonesProjectionPatterns("LAMBZ|CC(42|43|44|45|46|47|48|49|50)"); 141 138 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")); 144 141 145 142 /** -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchDataSetHandler.java
r28384 r28891 27 27 import org.openstreetmap.josm.data.osm.OsmPrimitive; 28 28 import org.openstreetmap.josm.data.osm.Tag; 29 import org.openstreetmap.josm.data.projection.Lambert;30 29 import org.openstreetmap.josm.data.projection.Projection; 31 import org.openstreetmap.josm.data.projection.UTM; 32 import org.openstreetmap.josm.data.projection.UTM.Hemisphere; 30 import org.openstreetmap.josm.data.projection.Projections; 33 31 import org.openstreetmap.josm.plugins.opendata.core.datasets.SimpleDataSetHandler; 34 32 import org.openstreetmap.josm.plugins.opendata.core.io.tabular.DefaultCsvHandler; … … 41 39 42 40 protected static final Projection lambert93 = PRJ_LAMBERT_93.getProjection(); // France metropolitaine 43 protected static final UTM utm20 = new UTM(20, Hemisphere.North); //Guadeloupe, Martinique44 protected static final UTM utm22 = new UTM(22, Hemisphere.North); //Guyane45 protected static final UTM utm38 = new UTM(38, Hemisphere.South); //Mayotte46 protected static final UTM utm40 = new UTM(40, Hemisphere.South); //Reunion47 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]; 49 47 static { 50 48 for (int i=0; i<lambert4Zones.length; i++) { 51 lambert4Zones[i] = new Lambert(i);49 lambert4Zones[i] = Projections.getProjectionByCode("EPSG:"+Integer.toString(27561+i)); 52 50 } 53 51 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/LambertCC9ZonesProjectionPatterns.java
r28000 r28891 5 5 import java.util.regex.Matcher; 6 6 7 import org.openstreetmap.josm.data.projection.LambertCC9Zones;8 7 import org.openstreetmap.josm.data.projection.Projection; 8 import org.openstreetmap.josm.data.projection.Projections; 9 9 10 10 public class LambertCC9ZonesProjectionPatterns extends ProjectionPatterns { 11 11 12 public static final LambertCC9Zones[] lambertCC9Zones = new LambertCC9Zones[9];12 public static final Projection[] lambertCC9Zones = new Projection[9]; 13 13 static { 14 14 for (int i=0; i<lambertCC9Zones.length; i++) { 15 lambertCC9Zones[i] = new LambertCC9Zones(i);15 lambertCC9Zones[i] = Projections.getProjectionByCode("EPSG:"+Integer.toString(3942+i)); 16 16 } 17 17 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReader.java
r28000 r28891 36 36 import org.openstreetmap.josm.data.osm.RelationMember; 37 37 import 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;41 38 import org.openstreetmap.josm.data.projection.Projection; 39 import org.openstreetmap.josm.data.projection.Projections; 42 40 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 43 41 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler; … … 123 121 124 122 if (proj == Longitude_Latitude) { 125 josmProj = new Epsg4326();123 josmProj = Projections.getProjectionByCode("EPSG:4326"); // WGS 84 126 124 return; 127 125 } … … 238 236 // This sounds good for Lambert 93 or Lambert CC 9 239 237 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 241 239 } else if (equals(falseEasting, 1700000.0)) { 242 240 for (int i=0; josmProj == null && i<9; i++) { 243 241 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 245 243 } 246 244 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/SpreadSheetReader.java
r28364 r28891 32 32 import org.openstreetmap.josm.data.osm.DataSet; 33 33 import org.openstreetmap.josm.data.osm.Node; 34 import org.openstreetmap.josm.data.projection.LambertCC9Zones;35 34 import org.openstreetmap.josm.data.projection.Projection; 36 35 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 45 44 private static final NumberFormat formatUK = NumberFormat.getInstance(Locale.UK); 46 45 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 54 46 protected final SpreadSheetHandler handler; 55 47
Note:
See TracChangeset
for help on using the changeset viewer.