[Schmitzm-commits] r1567 - in trunk/schmitzm-gt/src: main/java/de/schmitzm/geotools/io test/java/de/schmitzm/geotools/io test/java/de/schmitzm/geotools/testing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 27 18:21:12 CEST 2011


Author: alfonx
Date: 2011-04-27 18:21:12 +0200 (Wed, 27 Apr 2011)
New Revision: 1567

Modified:
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io/GeoImportUtil.java
   trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java
   trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/testing/GTTestingUtil.java
Log:
crs parameter bei methode wurde nicht verwendet.. entfernt...

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	2011-04-26 05:39:48 UTC (rev 1566)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/io/GeoImportUtil.java	2011-04-27 16:21:12 UTC (rev 1567)
@@ -395,7 +395,7 @@
 	 * @throws IOException
 	 *             if an error occur
 	 */
-	public static DataStore readDataStoreFromShape(URL shpURL, URL prjURL)
+	public static DataStore readDataStoreFromShape(URL shpURL)
 			throws IOException {
 		Map<Object, Object> map = new HashMap<Object, Object>();
 		map.put("url", shpURL);
@@ -544,7 +544,7 @@
 	public static FeatureCollection<SimpleFeatureType, SimpleFeature> readFeaturesFromShapeURL(
 			URL shpURL, URL prjUrl) throws IOException {
 
-		DataStore store = readDataStoreFromShape(shpURL, prjUrl);
+		DataStore store = readDataStoreFromShape(shpURL);
 
 		/**
 		 * .crs ?
@@ -555,7 +555,9 @@
 			// zu setzen
 			// LOGGER.debug("  parseWKT on " + prjUrl);
 			// CRS.parseWKT(readProjectionString(prjUrl));
-			GTUtil.createCRS(readProjectionString(prjUrl));
+			CoordinateReferenceSystem createCRS = GTUtil.createCRS(readProjectionString(prjUrl));
+			((ShapefileDataStore) store).forceSchemaCRS(createCRS);
+
 		} catch (Exception err) {
 			LOGGER.warn(" CRS.parseWKT mit Ex\n: ", err);
 			LOGGER.warn(" No projection found for file. Default is used.");

Modified: trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java
===================================================================
--- trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java	2011-04-26 05:39:48 UTC (rev 1566)
+++ trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/io/GeoImportUtilTest.java	2011-04-27 16:21:12 UTC (rev 1567)
@@ -56,4 +56,10 @@
 		// idxShpDs.buildQuadTree();
 		// assertFalse(GeoImportUtil.isOldBrokenQix(idxShpDs));
 	}
+
+	@Test
+	public void testCreateGridReaderFromGeoTiff()
+	{
+	
+	}
 }
\ No newline at end of file

Modified: trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/testing/GTTestingUtil.java
===================================================================
--- trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/testing/GTTestingUtil.java	2011-04-26 05:39:48 UTC (rev 1566)
+++ trunk/schmitzm-gt/src/test/java/de/schmitzm/geotools/testing/GTTestingUtil.java	2011-04-27 16:21:12 UTC (rev 1567)
@@ -95,7 +95,7 @@
 		}
 
 		public DataStore getDataStore() throws IOException {
-			DataStore ds = GeoImportUtil.readDataStoreFromShape(getUrl(), null);
+			DataStore ds = GeoImportUtil.readDataStoreFromShape(getUrl());
 			return ds;
 		}
 



More information about the Schmitzm-commits mailing list