[Schmitzm-commits] r1986 - trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat May 5 21:50:31 CEST 2012


Author: mojays
Date: 2012-05-05 21:50:31 +0200 (Sat, 05 May 2012)
New Revision: 1986

Modified:
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io/GeoImportUtil.java
Log:


Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io/GeoImportUtil.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io/GeoImportUtil.java	2012-05-05 17:13:14 UTC (rev 1985)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io/GeoImportUtil.java	2012-05-05 19:50:31 UTC (rev 1986)
@@ -59,6 +59,7 @@
 import javax.imageio.ImageIO;
 
 import org.apache.commons.lang.NotImplementedException;
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.geotools.coverage.grid.GridCoverage2D;
 import org.geotools.coverage.grid.GridCoverageFactory;
@@ -563,7 +564,10 @@
 			((ShapefileDataStore) store).forceSchemaCRS(createCRS);
 
 		} catch (Exception err) {
-			LOGGER.warn(" CRS.parseWKT mit Exception abgebrochen\n: ", err);
+		    // Show exception only in unexpected situation. If no URL given at all
+		    // is evident that CRS can not be parsed!
+		    if ( prjUrl != null )
+		      LOGGER.warn(" CRS.parseWKT(.) mit Exception abgebrochen\n: ", err);
 			LOGGER.warn(" No projection found for file. Default is used.");
 			LOGGER.warn(" NOT calling forceSchemaCRS now... please provide a URL to an existing .prj file!");
 			// store.forceSchemaCRS(DEFAULT_CRS);



More information about the Schmitzm-commits mailing list