Changeset 28055 in osm for applications/editors/josm
- Timestamp:
- 2012-03-12T23:46:51+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/includes/org/geotools/referencing/operation/projection/MapProjection.java
r28000 r28055 688 688 689 689 /** 690 * Default version of {@link #checkTransform(double,double,Point2D,double)}. 691 */ 692 static boolean checkTransform(final double x, final double y, final Point2D expected) { 693 return checkTransform(x, y, expected, EPSILON); 694 } 695 696 /** 690 697 * Checks if inverse transform using spherical formulas produces the same result 691 698 * than ellipsoidal formulas. This method is invoked during assertions only. … … 707 714 } 708 715 return tolerance < Double.POSITIVE_INFINITY; 716 } 717 718 /** 719 * Default version of {@link #checkInverseTransform(double,double,Point2D,double)}. 720 */ 721 static boolean checkInverseTransform(double longitude, double latitude, Point2D expected) { 722 return checkInverseTransform(longitude, latitude, expected, EPSILON); 709 723 } 710 724 -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/hydrologie/EauxDeSurfaceHandler.java
r28054 r28055 16 16 package org.openstreetmap.josm.plugins.opendata.modules.fr.datagouvfr.datasets.hydrologie; 17 17 18 import java.io.BufferedReader; 19 import java.io.BufferedWriter; 20 import java.io.File; 21 import java.io.FileReader; 22 import java.io.FileWriter; 18 23 import java.net.MalformedURLException; 19 24 import java.net.URL; … … 29 34 public class EauxDeSurfaceHandler extends DataGouvDataSetHandler { 30 35 31 private static final String ZIP_PATTERN = "FR( I|J|K|L)_SW";32 private static final String SHP_PATTERN = "FR_( I|J|K|L)_SWB_.W_20......";36 private static final String ZIP_PATTERN = "FR(.*)_SW"; 37 private static final String SHP_PATTERN = "FR_(.*)_SWB_.W_20......"; 33 38 34 private static final String[] letters = new String[]{"I","J","K","L"}; 35 private static final String[] names = new String[]{"Guadeloupe","Martinique","Guyane","La Réunion"}; 36 private static final String[] urls = new String[]{ 37 "Couche-SIG-des-caractéristiques-des-bassins-2010-%3A-eaux-de-surface---Guadeloupe-30381899", 38 "Couche-SIG-des-caractéristiques-des-bassins-2010-%3A-eaux-de-surface---Martinique-30381935", 39 "Couche-SIG-des-caractéristiques-des-bassins-2010-%3A-eaux-de-surface---Guyane-30381988", 40 "Couche-SIG-des-caractéristiques-des-bassins-2010-%3A-eaux-de-surface---Réunion-30381991" 41 }; 39 private static final class WaterAgency { 40 public final String code; 41 public final String name; 42 public final String suffix; 43 public WaterAgency(String code, String name, String suffix) { 44 this.code = code; 45 this.name = name; 46 this.suffix = suffix; 47 } 48 } 49 50 private static final WaterAgency[] waterAgencies = new WaterAgency[]{ 51 new WaterAgency("A", "Escaut Somme", "Escaut-Somme-30381967"), 52 new WaterAgency("B1", "Meuse", "Meuse-30381855"), 53 new WaterAgency("B2", "Sambre", "Sambre-30381857"), 54 new WaterAgency("C", "Rhin", "Rhin-30381951"), 55 new WaterAgency("D", "Rhône Méditerranée", "Rhône-Méditerranée-30382014"), 56 new WaterAgency("E", "Corse", "Corse-30381905"), 57 new WaterAgency("F", "Adour Garonne", "Adour-Garonne-30381839"), 58 new WaterAgency("G", "Loire Bretagne", "Loire-Bretagne-30381904"), 59 new WaterAgency("I", "Guadeloupe", "Guadeloupe-30381899"), 60 new WaterAgency("J", "Martinique", "Martinique-30381935"), 61 new WaterAgency("K", "Guyane", "Guyane-30381988"), 62 new WaterAgency("L", "La Réunion", "Réunion-30381991"), 63 }; 42 64 43 65 public EauxDeSurfaceHandler() { … … 67 89 Matcher m = Pattern.compile(".*"+pattern+"\\....").matcher(filename); 68 90 if (m.matches()) { 69 for (int i =0; i< letters.length; i++) {70 if ( letters[i].equals(m.group(1))) {71 return urls[i];91 for (int i =0; i<waterAgencies.length; i++) { 92 if (waterAgencies[i].code.equals(m.group(1))) { 93 return "Couche-SIG-des-caractéristiques-des-bassins-2010-%3A-eaux-de-surface---"+waterAgencies[i].suffix; 72 94 } 73 95 } … … 89 111 List<Pair<String, URL>> result = new ArrayList<Pair<String,URL>>(); 90 112 try { 91 for (int i =0; i< letters.length; i++) {92 result.add(getDownloadURL( i));113 for (int i =0; i<waterAgencies.length; i++) { 114 result.add(getDownloadURL(waterAgencies[i])); 93 115 } 94 116 } catch (MalformedURLException e) { … … 98 120 } 99 121 100 private Pair<String, URL> getDownloadURL(int i) throws MalformedURLException { 101 return new Pair<String, URL>(names[i], new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+letters[i]+"_SW.zip")); 122 private Pair<String, URL> getDownloadURL(WaterAgency a) throws MalformedURLException { 123 return new Pair<String, URL>(a.name, new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip")); 124 } 125 126 /* (non-Javadoc) 127 * @see org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler#notifyTempFileWritten(java.io.File) 128 */ 129 @Override 130 public void notifyTempFileWritten(File file) { 131 if (file.getName().matches(SHP_PATTERN.replace("(.*)", "F")+"\\.prj")) { // Adour-Garonne .prj files cannot be parsed because they do not contain quotes... 132 try { 133 BufferedReader reader = new BufferedReader(new FileReader(file)); 134 String line = reader.readLine(); 135 reader.close(); 136 if (!line.contains("\"")) { 137 for (String term : new String[]{"GCS_ETRS_1989", "D_ETRS_1989", "GRS_1980", "Greenwich", "Degree"}) { 138 line = line.replace(term, "\""+term+"\""); 139 } 140 BufferedWriter writer = new BufferedWriter(new FileWriter(file)); 141 writer.write(line); 142 writer.close(); 143 } 144 } catch (Exception e) { 145 e.printStackTrace(); 146 } 147 } 102 148 } 103 149 } -
applications/editors/josm/plugins/opendata/resources/META-INF/services/org.geotools.referencing.operation.MathTransformProvider
r28000 r28055 28 28 org.geotools.referencing.operation.projection.LambertConformal2SP$Provider 29 29 org.geotools.referencing.operation.projection.LambertConformalBelgium$Provider 30 #org.geotools.referencing.operation.projection.LambertAzimuthalEqualArea$Provider30 org.geotools.referencing.operation.projection.LambertAzimuthalEqualArea$Provider 31 31 #org.geotools.referencing.operation.projection.Orthographic$Provider 32 32 #org.geotools.referencing.operation.projection.Stereographic$Provider -
applications/editors/josm/plugins/opendata/resources/org/geotools/referencing/crs/epsg.properties
r28033 r28055 13 13 2980=PROJCS["Combani 1950 / UTM zone 38S", GEOGCS["Combani 1950", DATUM["Combani 1950", SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY["EPSG","7022"]], TOWGS84[-382.0, -59.0, -262.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6632"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4632"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 45.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9996], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 10000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","2980"]] 14 14 2987=PROJCS["Saint Pierre et Miquelon 1950 / UTM zone 21N", GEOGCS["Saint Pierre et Miquelon 1950", DATUM["Saint Pierre et Miquelon 1950", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[30.0, 430.0, 368.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6638"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4638"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -57.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9996], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","2987"]] 15 3034=PROJCS["ETRS89 / LCC Europe", GEOGCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4258"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 10.0], PARAMETER["latitude_of_origin", 52.0], PARAMETER["standard_parallel_1", 65.0], PARAMETER["false_easting", 4000000.0], PARAMETER["false_northing", 2800000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 35.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3034"]] 16 3035=PROJCS["ETRS89 / LAEA Europe", GEOGCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4258"]], PROJECTION["Lambert_Azimuthal_Equal_Area", AUTHORITY["EPSG","9820"]], PARAMETER["latitude_of_center", 52.0], PARAMETER["longitude_of_center", 10.0], PARAMETER["false_easting", 4321000.0], PARAMETER["false_northing", 3210000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3035"]] 15 17 3312=PROJCS["CSG67 / UTM zone 21N", GEOGCS["CSG67", DATUM["Centre Spatial Guyanais 1967", SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY["EPSG","7022"]], TOWGS84[-186.0, 230.0, 110.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6623"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4623"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -57.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9996], PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3312"]] 18 3416=PROJCS["ETRS89 / Austria Lambert", GEOGCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4258"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 47.5], PARAMETER["standard_parallel_1", 49.0], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", 400000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 46.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3416"]] 19 3447=PROJCS["ETRS89 / Belgian Lambert 2005", GEOGCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4258"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 4.359215833333335], PARAMETER["latitude_of_origin", 50.79781500000001], PARAMETER["standard_parallel_1", 51.16666666666667], PARAMETER["false_easting", 150328.0], PARAMETER["false_northing", 166262.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 49.833333333333336], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3447"]] 16 20 3727=PROJCS["Reunion 1947 / TM Reunion", GEOGCS["Reunion 1947", DATUM["Reunion 1947", SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY["EPSG","7022"]], TOWGS84[94.0, -948.0, -1262.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6626"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4626"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 55.53333333333333], PARAMETER["latitude_of_origin", -21.116666666666667], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 160000.0], PARAMETER["false_northing", 50000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3727"]] 17 18 21 3812=PROJCS["ETRS89 / Belgian Lambert 2008", GEOGCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4258"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 4.359215833333335], PARAMETER["latitude_of_origin", 50.79781500000001], PARAMETER["standard_parallel_1", 51.16666666666667], PARAMETER["false_easting", 649328.0], PARAMETER["false_northing", 665262.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 49.833333333333336], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3812"]] 19 22 3942=PROJCS["RGF93 / CC42", GEOGCS["RGF93", DATUM["Reseau Geodesique Francais 1993", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 3.0], PARAMETER["latitude_of_origin", 42.0], PARAMETER["standard_parallel_1", 42.75], PARAMETER["false_easting", 1700000.0], PARAMETER["false_northing", 1200000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 41.25], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3942"]] … … 93 96 27573=PROJCS["NTF (Paris) / Lambert zone III",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.999877499],PARAMETER["false_easting",600000],PARAMETER["false_northing",3200000],AUTHORITY["EPSG","27573"],AXIS["X",EAST],AXIS["Y",NORTH]] 94 97 27574=PROJCS["NTF (Paris) / Lambert zone IV",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",46.85],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99994471],PARAMETER["false_easting",234.358],PARAMETER["false_northing",4185861.369],AUTHORITY["EPSG","27574"],AXIS["X",EAST],AXIS["Y",NORTH]] 95 #27581=PROJCS["NTF (Paris) / France I (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",55],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.999877341],PARAMETER["false_easting",600000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","27581"],AXIS["X",EAST],AXIS["Y",NORTH]]96 #27582=PROJCS["NTF (Paris) / France II (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],AUTHORITY["EPSG","27582"],AXIS["X",EAST],AXIS["Y",NORTH]]97 #27583=PROJCS["NTF (Paris) / France III (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.999877499],PARAMETER["false_easting",600000],PARAMETER["false_northing",3200000],AUTHORITY["EPSG","27583"],AXIS["X",EAST],AXIS["Y",NORTH]]98 #27584=PROJCS["NTF (Paris) / France IV (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",46.85],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99994471],PARAMETER["false_easting",234.358],PARAMETER["false_northing",4185861.369],AUTHORITY["EPSG","27584"],AXIS["X",EAST],AXIS["Y",NORTH]]99 #27591=PROJCS["NTF (Paris) / Nord France (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",55],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.999877341],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","27591"],AXIS["X",EAST],AXIS["Y",NORTH]]100 #27592=PROJCS["NTF (Paris) / Centre France (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","27592"],AXIS["X",EAST],AXIS["Y",NORTH]]101 #27593=PROJCS["NTF (Paris) / Sud France (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.999877499],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","27593"],AXIS["X",EAST],AXIS["Y",NORTH]]102 #27594=PROJCS["NTF (Paris) / Corse (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",46.85],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99994471],PARAMETER["false_easting",234.358],PARAMETER["false_northing",185861.369],AUTHORITY["EPSG","27594"],AXIS["X",EAST],AXIS["Y",NORTH]]103 98 104 99 27700=PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB 1936", SPHEROID["Airy 1830", 6377563.396, 299.3249646, AUTHORITY["EPSG","7001"]], TOWGS84[446.448, -125.157, 542.06, 0.15, 0.247, 0.842, -20.489], AUTHORITY["EPSG","6277"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4277"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -2.0], PARAMETER["latitude_of_origin", 49.0], PARAMETER["scale_factor", 0.9996012717], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", -100000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","27700"]] -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/AbstractDataSetHandler.java
r28054 r28055 36 36 import org.opengis.referencing.FactoryException; 37 37 import org.opengis.referencing.crs.CoordinateReferenceSystem; 38 import org.opengis.referencing.crs.GeographicCRS; 38 39 import org.opengis.referencing.datum.GeodeticDatum; 39 40 import org.opengis.referencing.operation.MathTransform; … … 474 475 475 476 public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient) throws FactoryException { 476 if (sourceCRS instanceof AbstractDerivedCRS && sourceCRS.getName().getCode().equalsIgnoreCase("Lambert_Conformal_Conic")) { 477 if (sourceCRS instanceof GeographicCRS && sourceCRS.getName().getCode().equalsIgnoreCase("GCS_ETRS_1989")) { 478 return CRS.findMathTransform(CRS.decode("EPSG:4258"), targetCRS, lenient); 479 } else if (sourceCRS instanceof AbstractDerivedCRS && sourceCRS.getName().getCode().equalsIgnoreCase("Lambert_Conformal_Conic")) { 477 480 List<MathTransform> result = new ArrayList<MathTransform>(); 478 481 AbstractDerivedCRS crs = (AbstractDerivedCRS) sourceCRS; … … 558 561 return setSkipXsdValidationInZipReading; 559 562 } 563 564 public void notifyTempFileWritten(File file) { 565 // Do nothing, let handler overload this method if they need it 566 } 560 567 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java
r28054 r28055 107 107 throw new IOException("Could not create temp file: " + file.getAbsolutePath()); 108 108 } 109 // Write temp file 109 110 FileOutputStream fos = new FileOutputStream(file); 110 111 byte[] buffer = new byte[8192]; … … 114 115 } 115 116 fos.close(); 117 // Allow handler to perform specific treatments (for example, fix invalid .prj files) 118 if (handler != null) { 119 handler.notifyTempFileWritten(file); 120 } 121 // Set last modification date 116 122 long time = entry.getTime(); 117 123 if (time > -1) { 118 124 file.setLastModified(time); 119 125 } 126 // Test file name to see if it may contain useful data 120 127 for (String ext : new String[] { 121 128 CSV_EXT, KML_EXT, KMZ_EXT, XLS_EXT, ODS_EXT, SHP_EXT, MIF_EXT, TAB_EXT
Note:
See TracChangeset
for help on using the changeset viewer.