[Schmitzm-commits] r1115 - trunk/src/schmitzm/geotools/io

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Oct 14 20:48:51 CEST 2010


Author: alfonx
Date: 2010-10-14 20:48:51 +0200 (Thu, 14 Oct 2010)
New Revision: 1115

Modified:
   trunk/src/schmitzm/geotools/io/GeoExportUtil.java
Log:
Use DataUtilities.fileToURL 

Modified: trunk/src/schmitzm/geotools/io/GeoExportUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/io/GeoExportUtil.java	2010-10-14 18:38:12 UTC (rev 1114)
+++ trunk/src/schmitzm/geotools/io/GeoExportUtil.java	2010-10-14 18:48:51 UTC (rev 1115)
@@ -38,6 +38,7 @@
 import javax.imageio.ImageIO;
 
 import org.geotools.coverage.grid.GridCoverage2D;
+import org.geotools.data.DataUtilities;
 import org.geotools.data.FeatureSource;
 import org.geotools.data.FeatureStore;
 import org.geotools.data.Transaction;
@@ -92,13 +93,14 @@
 		// DataStore fuer Ausgabe-Datei oeffnen
 		ShapefileDataStore shpStore = null;
 		try {
-			shpStore = new ShapefileDataStore(outFile.toURI().toURL());
+//			shpStore = new ShapefileDataStore(outFile.toURI().toURL());
+			shpStore = new ShapefileDataStore(DataUtilities.fileToURL(outFile));
 		} catch (IllegalArgumentException err) {
 			// ShapefileDataStore schmeisst eine IllegalArgumentException,
 			// wenn Dateiname nicht ".shp", ".dbf", ... ist
 			// -> Erweiterung anhaengen
 			outFile = IOUtil.appendFileExt(outFile, ".shp");
-			shpStore = new ShapefileDataStore(outFile.toURI().toURL());
+			shpStore = new ShapefileDataStore(DataUtilities.fileToURL(outFile));
 		}
 
 		try {



More information about the Schmitzm-commits mailing list