Package org.geotools.geometry.jts.spatialschema.geometry.primitive

Examples of org.geotools.geometry.jts.spatialschema.geometry.primitive.CurveBoundaryImpl


    /**
     * @inheritDoc
     * @see org.opengis.geometry.primitive.CurveSegment#getBoundary()
     */
    public CurveBoundary getBoundary() {
        return new CurveBoundaryImpl(null, new PointImpl(getStartPoint()), new PointImpl(getEndPoint()));
    }
View Full Code Here


            com.vividsolutions.jts.geom.Coordinate [] coords = jtsBoundary.getCoordinates();
            // If coords is emtpy, then this geometry is a ring.  So we return
            // an empty CurveBoundary object (i.e. one with both points set to
            // null).
            if ((coords == null) || (coords.length == 0)) {
                CurveBoundaryImpl result = new CurveBoundaryImpl(
                        getCoordinateReferenceSystem(), null, null);
                return result;
            }
            else {
                // If it wasn't empty, then return a CurveBoundary with the two
                // endpoints.
                if (coords.length != 2) {
                    // Should this be an assert instead?
                    throw new RuntimeException("ERROR: One dimensional " +
                            "primitive had wrong number of boundary points (" +
                            coords.length + ")");
                }
                CoordinateReferenceSystem crs = getCoordinateReferenceSystem();
                CurveBoundaryImpl result = new CurveBoundaryImpl(crs,
                        new PointImpl(JTSUtils.coordinateToDirectPosition(
                                coords[0], crs)),
                        new PointImpl(JTSUtils.coordinateToDirectPosition(
                                coords[1], crs)));
                return result;
View Full Code Here

TOP

Related Classes of org.geotools.geometry.jts.spatialschema.geometry.primitive.CurveBoundaryImpl

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.