Package org.opengis.geometry.primitive

Examples of org.opengis.geometry.primitive.Ring


    segments.add(lineString);   
    OrientableCurve curve = new CurveImpl(crs, segments);
    List<OrientableCurve> orientableCurves = new ArrayList<OrientableCurve>();
    orientableCurves.add(curve);
   
    Ring exterior = new RingImpl(orientableCurves);
    List<Ring> interiorList = new ArrayList<Ring>();

    SurfaceBoundaryImpl triangleBoundary =
      new SurfaceBoundaryImpl(crs, exterior, interiorList);
View Full Code Here


    CoordinateSystemAxis axis = crs.getCoordinateSystem().getAxis( dimension );
   
    if( axis.getDirection() == AxisDirection.OTHER ){
      return processSegmentToPrimitive( bounds, segment, dimension+1 );
    }
    Ring ring = processBoundsToRing( bounds, segment, dimension );
    return processRingToPrimitive( bounds, ring, dimension+1 );       
  }
View Full Code Here

   * @return a Surface defined by the given positions
   */
  public SurfaceImpl createSurfaceByDirectPositions(
      List<DirectPosition> positions) {
    // Test ok
    Ring extRing = this.createRingByDirectPositions(positions);
    List<Ring> intRings = new ArrayList<Ring>();
    SurfaceBoundary sfb = this.createSurfaceBoundary(extRing, intRings);
    return this.createSurface(sfb);
  }
View Full Code Here

        return new DirectPosition[0];
    }
   
    public static DirectPosition[] getExteriorDirectPositions(final Polygon polygon) {
        final SurfaceBoundary surfaceBoundary = polygon.getBoundary();
        final Ring exteriorRing = surfaceBoundary.getExterior();
        return GeometryUtils.getDirectPositions(exteriorRing);
    }
View Full Code Here

        final CoordinateReferenceSystem crs = exteriorRingPoints[0].getCoordinateReferenceSystem();
        final BasicFactories commonFactory = BasicFactories.getDefault();
        final GeometryFactory geometryFactory = commonFactory.getGeometryFactory(crs);
        final PrimitiveFactory primitiveFactory = commonFactory.getPrimitiveFactory(crs);
       
        final Ring exteriorRing = createRing(primitiveFactory, exteriorRingPoints);
       
        List interiorRingList = interiorRingsPoints.length == 0 ?
                Collections.EMPTY_LIST :
                    new ArrayList(interiorRingsPoints.length);
        for (int i = 0; i < interiorRingsPoints.length; i++) {
View Full Code Here

    private static SurfaceBoundary createSurfaceBoundary(
            final PrimitiveFactory primitiveFactory,
            final DirectPosition[] exteriorRingPoints,
            final DirectPosition[][] interiorRingsPoints) {
       
        final Ring exteriorRing = createRing(primitiveFactory, exteriorRingPoints);
       
        final List interiorRingList = interiorRingsPoints.length == 0 ?
                Collections.EMPTY_LIST :
                    new ArrayList();
        for (int i = 0; i < interiorRingsPoints.length; i++) {
View Full Code Here

            final PrimitiveFactory primitiveFactory,
            final DirectPosition[] points) {
       
        final List curveList = Collections.singletonList(createCurve(primitiveFactory, points));
       
        final Ring ring = primitiveFactory.createRing(curveList);
        return ring;
    }
View Full Code Here

             LineSegment segment = geometryFactory.createLineSegment( point1, point2 );
             segmentList.add( segment );
         }
         Curve curve = primitiveFactory.createCurve( segmentList );
         curves.add( curve);
         Ring ring = primitiveFactory.createRing( curves );
         SurfaceBoundary boundary = primitiveFactory.createSurfaceBoundary(ring,new ArrayList());
         SurfaceImpl surface = (SurfaceImpl) primitiveFactory.createSurface(boundary);
        
         Geometry peer = surface.computeJTSPeer();
    }
View Full Code Here

    public Solid createSolid(final SolidBoundary boundary) {
        return null;
    }

    public Ring createRing(final List curves) {
        Ring result = new RingImpl(crs);
        if (curves != null)
            result.getGenerators().addAll(curves);
        return result;
    }
View Full Code Here

     * @return
     * @see com.polexis.lite.spatialschema.geometry.primitive.SurfacePatchImpl#calculateJTSPeer()
     */
    public com.vividsolutions.jts.geom.Geometry calculateJTSPeer() {
        SurfaceBoundary boundary = getBoundary();
        Ring exterior = boundary.getExterior();
        List interiors = boundary.getInteriors();
        com.vividsolutions.jts.geom.Geometry g = ((JTSGeometry) exterior).getJTSGeometry();
        int numHoles = (interiors != null) ? interiors.size() : 0;
        com.vividsolutions.jts.geom.LinearRing jtsExterior =
            JTSUtils.GEOMETRY_FACTORY.createLinearRing(g.getCoordinates());
View Full Code Here

TOP

Related Classes of org.opengis.geometry.primitive.Ring

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.