[Schmitzm-commits] r592 - branches/1.0-gt2-2.6/src/skrueger/geotools
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Nov 28 02:11:11 CET 2009
Author: alfonx
Date: 2009-11-28 02:11:09 +0100 (Sat, 28 Nov 2009)
New Revision: 592
Modified:
branches/1.0-gt2-2.6/src/skrueger/geotools/GeomFilterGenerator.java
Log:
NPE Vermeiden: Wenn keine .prj gesetzt ist, und kein force_crs benutzt wird, dann muss man neuerdings (GT2.6) leider extra nochmal das crs setzen.
Modified: branches/1.0-gt2-2.6/src/skrueger/geotools/GeomFilterGenerator.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/geotools/GeomFilterGenerator.java 2009-11-26 14:50:37 UTC (rev 591)
+++ branches/1.0-gt2-2.6/src/skrueger/geotools/GeomFilterGenerator.java 2009-11-28 01:11:09 UTC (rev 592)
@@ -20,7 +20,9 @@
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import schmitzm.geotools.FilterUtil;
+import schmitzm.geotools.GTUtil;
import schmitzm.geotools.JTSUtil;
+import schmitzm.geotools.io.GeoImportUtil;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
@@ -108,6 +110,8 @@
GeometryDescriptor geomDescr = fs.getSchema().getGeometryDescriptor();
CoordinateReferenceSystem fsCRS = geomDescr
.getCoordinateReferenceSystem();
+ if (fsCRS == null)
+ fsCRS = GeoImportUtil.getDefaultCRS();
Class<?> binding = geomDescr.getType().getBinding();
GeometryFilterImpl filter;
More information about the Schmitzm-commits
mailing list