| | |
| | | |
| | | import org.apache.log4j.Logger; |
| | | |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryCollection; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | import com.vividsolutions.jts.geom.CoordinateList; |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | |
| | | /** |
| | | * ComplexShapeElement |
| | |
| | | { |
| | | ArrayList<Geometry> list = new ArrayList<Geometry>(); |
| | | |
| | | for (ListIterator it = listIterator(); it.hasNext(); ) |
| | | for (ListIterator it = listIterator(); it.hasNext();) |
| | | { |
| | | Element element = (Element) it.next(); |
| | | |
| | | if (element instanceof ShapeElement) |
| | | { |
| | | if( ((ShapeElement) element).getVerticeSize() == 0 || ((ShapeElement) element).getVerticeSize() > 1) |
| | | if (((ShapeElement) element).getVerticeSize() == 0 || ((ShapeElement) element).getVerticeSize() > 1) |
| | | { |
| | | list.add(((ShapeElement) element).toGeometry(factory)); |
| | | list.add(((ShapeElement) element).toGeometry(factory)); |
| | | } |
| | | } |
| | | else if (element instanceof LineStringElement) |
| | | } else if (element instanceof LineStringElement) |
| | | { |
| | | if( ((LineStringElement) element).getVerticeSize() == 0 || ((LineStringElement) element).getVerticeSize() > 1) |
| | | { |
| | | list.add(((LineStringElement) element).toGeometry(factory)); |
| | | } |
| | | if (((LineStringElement) element).getVerticeSize() == 0 || ((LineStringElement) element).getVerticeSize() > 1) |
| | | { |
| | | list.add(((LineStringElement) element).toGeometry(factory)); |
| | | } |
| | | } else if (element instanceof LineElement) |
| | | { |
| | | if( ((LineElement) element).getVertices().length == 0 || ((LineElement) element).getVertices().length > 1 ) |
| | | { |
| | | list.add(((LineElement) element).toGeometry(factory)); |
| | | } |
| | | if (((LineElement) element).getVertices().length == 0 || ((LineElement) element).getVertices().length > 1) |
| | | { |
| | | list.add(((LineElement) element).toGeometry(factory)); |
| | | } |
| | | } else if (element instanceof ArcElement) |
| | | { |
| | | } |