forked from geodmms/xdgnjobs

?? ?
2008-05-23 6eb2ea4bb982133d17e403582d7bcaced31af5f9
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
            {