Changeset 28055 in osm for applications/editors/josm/plugins/opendata/src/org
- Timestamp:
- 2012-03-12T23:46:51+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.