Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.JTSGeometry


    protected com.vividsolutions.jts.geom.Geometry computeJTSPeer() {
        // For each segment that comprises us, get the JTS peer.
        int n = curveSegments.size();
        ArrayList allCoords = new ArrayList();
        for (int i=0; i<n; i++) {
            JTSGeometry g = (JTSGeometry) curveSegments.get(i);
            com.vividsolutions.jts.geom.LineString jts =
                (com.vividsolutions.jts.geom.LineString) g.getJTSGeometry();
            int m = jts.getNumPoints();
            for (int j=0; j<m; j++) {
                allCoords.add(jts.getCoordinateN(j));
            }
            if (i != (n-1))
View Full Code Here


        if (patches.size() > 1) {
            //throw new UnsupportedOperationException("This implementation does not support surfaces with multiple patches.");
            final com.vividsolutions.jts.geom.Polygon[] polygons =
                new com.vividsolutions.jts.geom.Polygon[patches.size()];
            for (int i = 0; i < patches.size(); i++) {
                final JTSGeometry jtsGeometry = (JTSGeometry) patches.get(i);
                polygons[i] = (com.vividsolutions.jts.geom.Polygon) jtsGeometry.getJTSGeometry();
            }
            return JTSUtils.GEOMETRY_FACTORY.createMultiPolygon(polygons);
        }
        return ((JTSGeometry) patches.get(0)).getJTSGeometry();
    }
View Full Code Here

    protected com.vividsolutions.jts.geom.Geometry computeJTSPeer() {
        ArrayList childParts = new ArrayList();
        Iterator children = elements.iterator();
        while (children.hasNext()) {
            JTSGeometry jtsGeom = (JTSGeometry) children.next();
            childParts.add(jtsGeom.getJTSGeometry());
        }
        com.vividsolutions.jts.geom.Geometry result =
            JTSUtils.GEOMETRY_FACTORY.buildGeometry(childParts);
        return result;
    }
View Full Code Here

        if (patches.size() > 1) {
            //throw new UnsupportedOperationException("This implementation does not support surfaces with multiple patches.");
            final com.vividsolutions.jts.geom.Polygon[] polygons =
                new com.vividsolutions.jts.geom.Polygon[patches.size()];
            for (int i = 0; i < patches.size(); i++) {
                final JTSGeometry jtsGeometry = (JTSGeometry) patches.get(i);
                polygons[i] = (com.vividsolutions.jts.geom.Polygon) jtsGeometry.getJTSGeometry();
            }
            return JTSUtils.GEOMETRY_FACTORY.createMultiPolygon(polygons);
        }
        return ((JTSGeometry) patches.get(0)).getJTSGeometry();
    }
View Full Code Here

     */
    protected final Geometry computeJTSPeer() {
        ArrayList subParts = new ArrayList();
        Iterator elemIt = elements.iterator();
        while (elemIt.hasNext()) {
            JTSGeometry prim = (JTSGeometry) elemIt.next();
            subParts.add(prim.getJTSGeometry());
        }
        // JTS's geometry factory interface has a convenient method that'll
        // combine geometries by putting them into the most specific collection
        // class it can.
        return JTSUtils.GEOMETRY_FACTORY.buildGeometry(subParts);
View Full Code Here

TOP

Related Classes of org.geotools.geometry.jts.JTSGeometry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.