Package org.opengis.geometry.coordinate

Examples of org.opengis.geometry.coordinate.Polygon


                        box.getNorthBoundLatitude(), DefaultGeographicCRS.WGS84);
            } else if (extent2 instanceof BoundingPolygon) {
                BoundingPolygon boundingpoly = (BoundingPolygon) extent2;
                Collection<? extends Geometry> polygons = boundingpoly.getPolygons();
                for (Geometry geometry : polygons) {
                    Polygon poly = (Polygon) geometry;
                    org.opengis.geometry.Envelope envelope = poly.getBoundary().getEnvelope();
                    env = new ReferencedEnvelope(envelope.getMinimum(0), envelope.getMaximum(0),
                            envelope.getMinimum(1), envelope.getMaximum(1), envelope
                                    .getLowerCorner().getCoordinateReferenceSystem());
                    break;
                }
View Full Code Here


    Ring exteriorRing = tPrimFactory.createRingByDirectPositions(directPositionList);
    List<Ring> interiors = new ArrayList<Ring>();

    SurfaceBoundary boundary = new SurfaceBoundaryImpl(cf.getCoordinateReferenceSystem(), exteriorRing, interiors);
    Polygon poly = cf.createPolygon(boundary);
    assertNotNull(poly);
    assertNotNull(poly.getBoundary());
   
    PolygonImpl expected = new PolygonImpl((SurfaceBoundaryImpl) boundary);
    assertEquals(poly, expected);
   
    // test the PolygonImpl equals
View Full Code Here

                    (com.vividsolutions.jts.geom.LinearRing) jtsPolygon.getInteriorRingN(i),
                    crs));
            }
            SurfaceBoundary boundary = pf.createSurfaceBoundary(externalRing,
                    internalRings);
            Polygon polygon = gf.createPolygon(boundary);
            ArrayList patches = new ArrayList();
            patches.add(polygon);
            PolyhedralSurface result = gf.createPolyhedralSurface(patches);
            return result;
       
View Full Code Here

        final GeometryFactory geometryFactory = commonFactory.getGeometryFactory(crs);
       
        // create polygons from each of the arrays of directPositions
        final List polygons = new ArrayList(patchPoints.length);
        for (int i = 0; i < patchPoints.length; i++) {
            final Polygon polygon = createPolygon(patchPoints[i]);
            polygons.add(polygon);           
        }       
        return geometryFactory.createPolyhedralSurface(polygons);
    }
View Full Code Here

     */
    public Surface createSurface(final SurfaceBoundary boundary) {
        // For now, our implementation has to assume that the boundary is a
        // polygon.
        Surface result = new SurfaceImpl(crs);
        Polygon poly = geomFact.createPolygon(boundary);
        // PENDING(jdc): the following line is 1.5 specific.
        // the result.getPatches() list is a generic list with a type of "? extends SurfacePatch"
        // we can compile without the generic if we cast down to List, but why do we need the cast?
        // Polygon extends SurfacePatch, so in theory this should work...
        //((List<SurfacePatch>) result.getPatches()).add(poly);
View Full Code Here

TOP

Related Classes of org.opengis.geometry.coordinate.Polygon

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.