Examples of CurveImpl


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

    }
    return rPoint;
  }
 
  private CurveImpl createCurveFromWKT(String aWKTcurve) {
    CurveImpl rCurve = null;
    WKTReader wktReader = new WKTReader(this.crs);
    try {
      rCurve = (CurveImpl) wktReader.read(aWKTcurve);
    } catch (ParseException e) {
      e.printStackTrace();
View Full Code Here

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

    return rPoint;
  }

 
  private CurveImpl createCurveFromWKT(String aWKTcurve) {
    CurveImpl rCurve = null;
    WKTReader wktReader = new WKTReader(this.crs);
    try {
      rCurve = (CurveImpl) wktReader.read(aWKTcurve);
    } catch (ParseException e) {
      e.printStackTrace();
View Full Code Here

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

    tLineList1.add(geomFact.createLineString(line2));

    ArrayList<CurveSegment> tLineList2 = new ArrayList<CurveSegment>();
    tLineList2.add(geomFact.createLineString(line3));
    tLineList2.add(geomFact.createLineString(line4));
    CurveImpl curve1 = pf.createCurve(tLineList1);
    CurveImpl curve2 = pf.createCurve(tLineList2);
    ArrayList<OrientableCurve> curveList = new ArrayList<OrientableCurve>();
    curveList.add(curve1);
    curveList.add(curve2);
    CompositeCurve compcurve = complf.createCompositeCurve(curveList);
   
View Full Code Here

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

   
    // Set curve for further LineString tests
    ArrayList<CurveSegment> tLineList = new ArrayList<CurveSegment>();
    tLineList.add(line1);
   
    CurveImpl curve1 = tPrimFactory.createCurve(tLineList);
    line1.setCurve(curve1);
   
    // ***** length()
    //System.outprintln("\n***** TEST: .length()");
    //System.outprintln("Length of LineString is " + line1.length());
View Full Code Here

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

    points1.add(primitiveFactory.createPoint( new double[]{-123.4550070827961,48.54290089070186} ));
    points1.add(primitiveFactory.createPoint( new double[]{-123.47009555832284,48.543261561072285} ));
    LineString lineString1 = geometryFactory.createLineString(points1);
        List curveSegmentList1 = Collections.singletonList(lineString1);
       
        CurveImpl curve1 = (CurveImpl) primitiveFactory.createCurve(curveSegmentList1);
       
    /* 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);
   
View Full Code Here

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

   
    // Set curve for further LineString tests
    ArrayList<CurveSegment> tLineList = new ArrayList<CurveSegment>();
    tLineList.add(line1);
   
    CurveImpl curve1 = tPrimFactory.createCurve(tLineList);
    line1.setCurve(curve1);
   
    // ***** length()
    //System.out.println("\n***** TEST: .length()");
    //System.out.println("Length of LineString is " + line1.length());
View Full Code Here

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

  }


 
  private CurveImpl createCurveFromWKT(String aWKTcurve) {
    CurveImpl rCurve = null;
    WKTReader wktReader = new WKTReader(this.crs);
    try {
      rCurve = (CurveImpl) wktReader.read(aWKTcurve);
    } catch (ParseException e) {
      e.printStackTrace();
View Full Code Here

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

    points.add(this.createPointFromWKT("POINT(570 240)"));
    points.add(this.createPointFromWKT("POINT(570 240)"));
    points.add(this.createPointFromWKT("POINT(650 240)"));
    MultiPointImpl mp = (MultiPointImpl) this.builder.getAggregateFactory().createMultiPoint(points);
   
    CurveImpl line = this.createCurveFromWKT("CURVE(130 240, 650 240)");
   
    CurveImpl ch = (CurveImpl) mp.getConvexHull();
    //System.out.println(ch.equals(line));
    //System.out.println(line.equals(mp.getConvexHull()));
    //System.out.println(mp.getConvexHull().equals(line));

    assertTrue(mp.getConvexHull().equals(line));
View Full Code Here

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

  }


 
  private CurveImpl createCurveFromWKT(String aWKTcurve) {
    CurveImpl rCurve = null;
    WKTReader wktReader = new WKTReader(this.crs);
    try {
      rCurve = (CurveImpl) wktReader.read(aWKTcurve);
    } catch (ParseException e) {
      e.printStackTrace();
View Full Code Here

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

    ArrayList<CurveSegment> tLineList2 = new ArrayList<CurveSegment>();
    tLineList2.add(tCoordFactory.createLineString(line3));
    tLineList2.add(tCoordFactory.createLineString(line4));

    /* Build Curve */
    CurveImpl curve1 = tPrimFactory.createCurve(tLineList1);
    CurveImpl curve2 = tPrimFactory.createCurve(tLineList2);

   
    /* Build Ring */
    ArrayList<OrientableCurve> curveList = new ArrayList<OrientableCurve>();
    curveList.add(curve1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.