[Schmitzm-commits] r1141 - in trunk: src/schmitzm/geotools/io src_junit/schmitzm/geotools/feature
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Oct 16 22:59:01 CEST 2010
Author: alfonx
Date: 2010-10-16 22:59:01 +0200 (Sat, 16 Oct 2010)
New Revision: 1141
Modified:
trunk/src/schmitzm/geotools/io/GeoExportUtil.java
trunk/src/schmitzm/geotools/io/GeoImportUtil.java
trunk/src_junit/schmitzm/geotools/feature/FeatureUtilTest.java
Log:
Modified: trunk/src/schmitzm/geotools/io/GeoExportUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/io/GeoExportUtil.java 2010-10-16 12:02:19 UTC (rev 1140)
+++ trunk/src/schmitzm/geotools/io/GeoExportUtil.java 2010-10-16 20:59:01 UTC (rev 1141)
@@ -133,7 +133,8 @@
// Stefan Tzeggai 14.10.2010 Es wird angenommen, dass die gerade
// geschriebenen Features im aktuellen Charset des Computers geschrieben
// wurden. Das specihern wir in einer .cpg Datei.
- saveCpg(IOUtil.changeFileExt(outFile, "cpg"), Charset.defaultCharset());
+ writeCharset(IOUtil.changeFileExt(outFile, "cpg"),
+ Charset.defaultCharset());
}
/**
@@ -383,11 +384,11 @@
}
/**
- * Stores the given Charset as a .cpg file containing the name of charset.
- * If the file already contains the same content, it is not written (SVN
- * friendly)
+ * Stores the given {@link Charset} as a .cpg file containing the name of
+ * charset. If the file already contains the same content, it is not written
+ * (SVN friendly)
*/
- public static void saveCpg(final File cpgFile, Charset charset)
+ public static void writeCharset(final File cpgFile, Charset charset)
throws IOException {
String whatToWrite = charset.name();
Modified: trunk/src/schmitzm/geotools/io/GeoImportUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/io/GeoImportUtil.java 2010-10-16 12:02:19 UTC (rev 1140)
+++ trunk/src/schmitzm/geotools/io/GeoImportUtil.java 2010-10-16 20:59:01 UTC (rev 1141)
@@ -1304,8 +1304,9 @@
}
}
+ // TODO Diese Methode soll alle vom GP im Templ angelegten Dateienlöschen,
+ // da Windows das Temp nicht automatisch löscht.
public static boolean uncompressShapeZipCleanup() {
- // TODO
return false;
}
Modified: trunk/src_junit/schmitzm/geotools/feature/FeatureUtilTest.java
===================================================================
--- trunk/src_junit/schmitzm/geotools/feature/FeatureUtilTest.java 2010-10-16 12:02:19 UTC (rev 1140)
+++ trunk/src_junit/schmitzm/geotools/feature/FeatureUtilTest.java 2010-10-16 20:59:01 UTC (rev 1141)
@@ -7,6 +7,7 @@
import static org.junit.Assert.fail;
import java.io.File;
+import java.nio.charset.Charset;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -22,6 +23,8 @@
import org.opengis.feature.type.GeometryDescriptor;
import schmitzm.geotools.feature.FeatureUtil.GeometryForm;
+import schmitzm.geotools.io.GeoExportUtil;
+import schmitzm.io.IOUtil;
import schmitzm.swing.TestingUtil;
import schmitzm.swing.TestingUtil.TestDatasets;
import skrueger.geotools.io.GeoImportUtilURL;
@@ -103,8 +106,8 @@
.getLocalName());
File outFile = File.createTempFile("testModifyFeatureSource", ".shp");
-// File cpgFile = IOUtil.changeFileExt(outFile, "cpg");
-// TODO GeoExportUtil.saveCpg(cpgFile, Charset.forName("windows-1256"));
+ File cpgFile = IOUtil.changeFileExt(outFile, "cpg");
+// GeoExportUtil.writeCharset(cpgFile, Charset.forName("windows-1256"));
ShapefileDataStore outputFs = new ShapefileDataStore(
DataUtilities.fileToURL(outFile));
More information about the Schmitzm-commits
mailing list