From 3fabb511df6db394522efd684c90700aa4a4b12a Mon Sep 17 00:00:00 2001 From: ?? ? <ulysseskao@ximple.com.tw> Date: Tue, 20 May 2008 15:36:02 +0800 Subject: [PATCH] update for EOFM-95 --- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/IndexDgnConvertJobContext.java | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/IndexDgnConvertJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/IndexDgnConvertJobContext.java index 98a9d45..5710bc2 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/IndexDgnConvertJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/IndexDgnConvertJobContext.java @@ -7,6 +7,8 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.math.BigDecimal; +import java.math.RoundingMode; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -77,6 +79,13 @@ return; } + if (!txFeaturesContext.containsKey(feature.getFeatureType())) + { + txFeaturesContext.put(feature.getFeatureType(), new ArrayList()); + } + ArrayList arrayList = (ArrayList) txFeaturesContext.get(feature.getFeatureType()); + arrayList.add(feature); + feature = createFeature2((TextElement) element); if (feature == null) { @@ -89,7 +98,7 @@ { txFeaturesContext.put(feature.getFeatureType(), new ArrayList()); } - ArrayList arrayList = (ArrayList) txFeaturesContext.get(feature.getFeatureType()); + arrayList = (ArrayList) txFeaturesContext.get(feature.getFeatureType()); arrayList.add(feature); } @@ -272,6 +281,7 @@ { TextElement txtElement = (TextElement) element; double angle = txtElement.getRotationAngle(); + angle = BigDecimal.valueOf(angle).setScale(3, RoundingMode.HALF_UP).doubleValue(); convertDecorator.setConverter(txtElement); Feature feature = featureType.create(new Object[]{ convertDecorator.toGeometry(geometryFactory), -- Gitblit v0.0.0-SNAPSHOT