Package org.geotools.geometry.iso.primitive

Examples of org.geotools.geometry.iso.primitive.RingImpl


        PointImpl p2 = new PointImpl(iterator2.next());
        assertEquals(p1, p2, epsilon);
      }
    }
    else if (geom1 instanceof RingImpl && geom2 instanceof RingImpl) {
      RingImpl ring1 = (RingImpl) geom1;
      RingImpl ring2 = (RingImpl) geom2;
      List<DirectPosition> list1 = ring1.asDirectPositions();
      List<DirectPosition> list2 = ring2.asDirectPositions();
      Iterator<DirectPosition> iterator1 = list1.iterator();
      Iterator<DirectPosition> iterator2 = list2.iterator();
      while (iterator1.hasNext() && iterator2.hasNext()) {
        PointImpl p1 = new PointImpl(iterator1.next());
        PointImpl p2 = new PointImpl(iterator2.next());
View Full Code Here


    /* Build Ring from Curve */
    ArrayList<OrientableCurve> curveList = new ArrayList<OrientableCurve>();
    curveList.add(curve1);
   
    // Build Ring then SurfaceBoundary then Surface
    RingImpl exteriors = (RingImpl) primitiveFactory.createRing(curveList);
    List<Ring> interiors = new ArrayList<Ring>();
    SurfaceBoundary sboundary = primitiveFactory.createSurfaceBoundary(exteriors, interiors);
    Surface surface1 = primitiveFactory.createSurface(sboundary);
    Surface surface2 = (SurfaceImpl) surface1.transform(crs2);
   
    // create expected result
    PositionFactory expectedPosF2 = new PositionFactoryImpl(crs2, new PrecisionModel());
    PrimitiveFactory expectedPrimF2 = new PrimitiveFactoryImpl(crs2, expectedPosF2);
    GeometryFactory ExpectedGeomF2 = new GeometryFactoryImpl(crs2, expectedPosF2);
   
    List<Position> expectedPoints = new ArrayList<Position>();
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187128.000000001, 395268.0000000004} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187127.9999999998, 396026.99999999825} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1188245.0000000007, 396027.0000000039} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1188245.0000000005, 395268.0000000018} ));
    expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187128.000000001, 395268.0000000004} ));
        LineString expectedLineString = ExpectedGeomF2.createLineString(expectedPoints);
        List expectedCurveSegmentList = Collections.singletonList(expectedLineString);
       
        CurveImpl expectedCurve = (CurveImpl) expectedPrimF2.createCurve(expectedCurveSegmentList);
       
    /* Build Ring from Curve */
    ArrayList<OrientableCurve> expectedCurveList = new ArrayList<OrientableCurve>();
    expectedCurveList.add(expectedCurve);
   
    // Build Ring then SurfaceBoundary then Surface
    RingImpl exteriors2 = (RingImpl) expectedPrimF2.createRing(expectedCurveList);
    List<Ring> interiors2 = new ArrayList<Ring>();
    SurfaceBoundary sboundary2 = expectedPrimF2.createSurfaceBoundary(exteriors2, interiors2);
    Surface expectedSurface = expectedPrimF2.createSurface(sboundary2);
       
    //System.out.println(surface1);
View Full Code Here

    // Create List of OrientableCurveĀ“s (CurveĀ“s)
    OrientableCurve curve = new CurveImpl(crs, segments);
    List<OrientableCurve> orientableCurves = new ArrayList<OrientableCurve>();
    orientableCurves.add(curve);

    this.ring = new RingImpl(orientableCurves);   
    // this.ring = (RingImpl) this.mFeatGeomFactory.getPrimitiveFactory().createRingByDirectPositions(dpList);
   
    // isHole is now calculated in the constructor.
    /*
    // See if the Ring is counterclockwise oriented
View Full Code Here

    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

   *             was encountered
   */
  private Ring readLinearRingText() throws IOException, ParseException {
    List<OrientableCurve> curves = new ArrayList<OrientableCurve>();
    curves.add(this.createCurve(this.getCoordinates()));
    return new RingImpl(curves); //this.primitiveFactory.createRing(curves);

  }
View Full Code Here

    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 sb =
      new SurfaceBoundaryImpl(crs, exterior, interiorList);
    return new SurfaceImpl(sb);
View Full Code Here

TOP

Related Classes of org.geotools.geometry.iso.primitive.RingImpl

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.