From 6eb2ea4bb982133d17e403582d7bcaced31af5f9 Mon Sep 17 00:00:00 2001 From: ?? ? <ulysseskao@ximple.com.tw> Date: Fri, 23 May 2008 19:57:23 +0800 Subject: [PATCH] update for EOFM-103 --- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeneralDgnConvertJobContext.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeneralDgnConvertJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeneralDgnConvertJobContext.java index 6ecda50..2f1eeb6 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeneralDgnConvertJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/GeneralDgnConvertJobContext.java @@ -10,6 +10,7 @@ import java.util.TreeMap; import java.math.BigDecimal; import java.math.RoundingMode; +import java.nio.charset.Charset; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -158,7 +159,9 @@ writer = featuresWriterContext.get(featureType.getTypeName()); } else { - ShapefileDataStore shapefileDataStore = new ShapefileDataStore(sfile.toURI().toURL()); + // ShapefileDataStore shapefileDataStore = new ShapefileDataStore(sfile.toURI().toURL()); + ShapefileDataStore shapefileDataStore = new ShapefileDataStore(sfile.toURI().toURL(), + true, Charset.forName("UTF-8")); shapefileDataStore.createSchema(featureType); writer = shapefileDataStore.getFeatureWriter(featureType.getTypeName(), Transaction.AUTO_COMMIT); featuresWriterContext.put(featureType.getTypeName(), writer); @@ -280,6 +283,7 @@ Geometry geom = convertDecorator.toGeometry(geometryFactory); double angle = textElement.getRotationAngle(); + String content = textElement.getText(); angle = BigDecimal.valueOf(angle).setScale(3, RoundingMode.HALF_UP).doubleValue(); if (geom != null) { @@ -291,7 +295,7 @@ textElement.getTextHeight(), textElement.getTextWidth(), angle, - textElement.getText() + content }); } else { -- Gitblit v0.0.0-SNAPSHOT