forked from geodmms/xdgnjobs

?? ?
2008-05-15 c25905d7c4d0547e798e19454815a6ec7a736fcb
xdgnjobs/ximple-dgnio/src/main/java/com/ximple/io/dgn7/ComplexShapeElement.java
@@ -13,6 +13,7 @@
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryCollection;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.CoordinateList;
/**
 * ComplexShapeElement
@@ -25,7 +26,7 @@
{
    private static final Logger logger = Logger.getLogger(ComplexShapeElement.class);
    ArrayList list = new ArrayList();
    ArrayList<Element> list = new ArrayList<Element>();
    public ComplexShapeElement(byte[] raw)
    {
@@ -59,7 +60,7 @@
    public boolean add(Object o)
    {
        return list.add(o);
        return list.add((Element) o);
    }
    public boolean remove(Object o)
@@ -89,12 +90,12 @@
    public Object set(int index, Object element)
    {
        return list.set(index, element);
        return list.set(index, (Element) element);
    }
    public void add(int index, Object element)
    {
        list.add(index, element);
        list.add(index, (Element) element);
    }
    public Object remove(int index)
@@ -177,10 +178,14 @@
            }
        }
        Geometry[]         ga   = list.toArray(new Geometry[list.size()]);
        GeometryCollection geos = new GeometryCollection(ga, factory);
        return geos;
        CoordinateList pts = new CoordinateList();
        for (Geometry geom : list)
        {
            pts.add(geom.getCoordinates(), true);
        }
        return factory.createLinearRing(pts.toCoordinateArray());
    }
    public static class ElementHandler extends Element.ElementHandler