Author: groldan
Date: 2009-11-03 13:55:27 -0500 (Tue, 03 Nov 2009)
New Revision: 34316
Modified:
trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/raster/gce/ArcSDERasterFormat.java
Log:
GEOS-1447, use File.toURI.toURL to convert the input argument o URL
Modified: trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/raster/gce/ArcSDERasterFormat.java
===================================================================
--- trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/raster/gce/ArcSDERasterFormat.java 2009-11-03 18:23:08 UTC (rev 34315)
+++ trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/raster/gce/ArcSDERasterFormat.java 2009-11-03 18:55:27 UTC (rev 34316)
@@ -19,6 +19,7 @@
import java.io.File;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;
@@ -309,7 +310,12 @@
LOGGER.fine("connecting to ArcSDE Raster: " + coverageUrl);
}
} else if (input instanceof File) {
- coverageUrl = ((File) input).getPath();
+ try {
+ coverageUrl = ((File) input).toURI().toURL().toExternalForm();
+ } catch (MalformedURLException e) {
+ throw new IllegalArgumentException("Can't create coverage URL out of (file) "
+ + ((File) input).getAbsolutePath());
+ }
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("connectiong via file-hack to ArcSDE Raster: " + coverageUrl);
}
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
GeoTools-commits mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-commits