| | |
| | | package com.ximple.eofms.filter; |
| | | |
| | | import java.util.TreeMap; |
| | | import java.util.List; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.List; |
| | | import java.util.TreeMap; |
| | | import javax.swing.event.EventListenerList; |
| | | |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.geotools.feature.FeatureTypeBuilder; |
| | | import org.geotools.feature.FeatureType; |
| | | import org.geotools.feature.SchemaException; |
| | | import org.geotools.feature.Feature; |
| | | import org.geotools.feature.FeatureType; |
| | | import org.geotools.feature.FeatureTypeBuilder; |
| | | import org.geotools.feature.IllegalAttributeException; |
| | | import org.geotools.feature.SchemaException; |
| | | |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | import com.vividsolutions.jts.geom.CoordinateList; |
| | | import com.vividsolutions.jts.geom.Coordinate; |
| | | import com.vividsolutions.jts.util.Assert; |
| | | |
| | | import com.ximple.eofms.util.TWD97GeometryConverterDecorator; |
| | | import com.ximple.eofms.util.FeatureTypeBuilderUtil; |
| | | import com.ximple.eofms.util.DefaultColorTable; |
| | | import com.ximple.io.dgn7.FrammeAttributeData; |
| | | import com.ximple.eofms.util.FeatureTypeBuilderUtil; |
| | | import com.ximple.eofms.util.TWD97GeometryConverterDecorator; |
| | | import com.ximple.io.dgn7.Element; |
| | | import com.ximple.io.dgn7.UserAttributeData; |
| | | import com.ximple.io.dgn7.FrammeAttributeData; |
| | | import com.ximple.io.dgn7.GeometryConverter; |
| | | import com.ximple.io.dgn7.TextElement; |
| | | import com.ximple.io.dgn7.TextNodeElement; |
| | | import com.ximple.io.dgn7.GeometryConverter; |
| | | import com.ximple.io.dgn7.UserAttributeData; |
| | | |
| | | public class CreateMultiSymbolStrategy implements CreateFeatureTypeStrategy |
| | | { |
| | |
| | | |
| | | GeometryConverter converter = getConverter(); |
| | | Geometry geom = null; |
| | | try |
| | | { |
| | | if (converter instanceof TextElement) |
| | | { |
| | | geom = ((TextElement) converter).toAnchorGeometry(factory); |
| | |
| | | { |
| | | geom = ((TextNodeElement) converter).toAnchorGeometry(factory); |
| | | } |
| | | } catch (ArrayStoreException e) |
| | | { |
| | | logger.warn(e.getMessage(), e); |
| | | if (converter instanceof TextNodeElement) |
| | | { |
| | | TextNodeElement node = (TextNodeElement) converter; |
| | | CoordinateList pts = new CoordinateList(); |
| | | for (int i = 0; i < node.size(); i++) |
| | | { |
| | | TextElement txtElm = (TextElement) node.get(i); |
| | | Coordinate[] coords = txtElm.toAnchorCoordinates(); |
| | | logger.warn("-coords=[" + coords.length + "]"); |
| | | for (int j = 0; j < coords.length; j++) |
| | | { |
| | | logger.warn("[" + j + "]-" + coords.toString()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (geom == null) return null; |
| | | geom.apply(getCoordinatesFilter()); |
| | | return geom; |