Package org.geotools.geometry.iso.primitive

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


    // Create List of CurveSegment´s (LineString´s)
    LineStringImpl lineString = new LineStringImpl(new PointArrayImpl(
        positionList), 0.0);
    List<CurveSegment> segments = new ArrayList<CurveSegment>();
    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>();
View Full Code Here


   
  }
 
  private void _testCurve1(GeometryBuilder builder) {
   
    CurveImpl curve1 = (CurveImpl) this._createCurve1(builder);
    this.printCurve(curve1);
    CurveImpl curve2 = (CurveImpl) this._createCurve2(builder);
    this.printCurve(curve2);
   
//    GeometryImpl g = (GeometryImpl) curve1.intersection(curve2);
//    //System.out.println("Intersection of curves: " + g);
View Full Code Here

    /* Set parent curve for LineString */
    ArrayList<CurveSegment> tLineList = new ArrayList<CurveSegment>();
    tLineList.add(line1);

    // PrimitiveFactory.createCurve(List<CurveSegment>)
    CurveImpl curve1 = tPrimFactory.createCurve(tLineList);
   
    // Set curve for further LineString tests
    line1.setCurve(curve1);
   
    return curve1;
View Full Code Here

    /* Set parent curve for LineString */
    ArrayList<CurveSegment> tLineList = new ArrayList<CurveSegment>();
    tLineList.add(line1);
   
    // PrimitiveFactory.createCurve(List<CurveSegment>)
    CurveImpl curve1 = tPrimFactory.createCurve(tLineList);
   
    // Set curve for further LineString tests
    line1.setCurve(curve1);
   
    return curve1;
View Full Code Here

    }
    // Create List of CurveSegment´s (LineString´s)
    LineString lineString = new LineStringImpl(new PointArrayImpl( points ), 0.0); //this.geometryFactory.createLineString(points);
    List<CurveSegment> segments = new ArrayList<CurveSegment>();
    segments.add(lineString);
    return new CurveImpl(crs, segments); //this.primitiveFactory.createCurve(segments);
  }
View Full Code Here

          // this is not a point, so get its convexhull and add those
          // points to this hull
          Geometry hull = prim.getConvexHull();
         
          if (hull instanceof CurveImpl) {
            CurveImpl curve = (CurveImpl) prim.getConvexHull();
            positions.addAll( ((CurveImpl)curve).asDirectPositions() );
          }
          else if (hull instanceof SurfaceImpl) {
            SurfaceImpl surface = (SurfaceImpl) prim.getConvexHull();
            positions.addAll( ((RingImplUnsafe)((SurfaceImpl)surface).getBoundary().getExterior()).asDirectPositions() );
View Full Code Here

    if (inputPts.length == 2) {
      List<Position> positions = CoordinateArrays.toPositionList(this.crs, this.inputPts);
      LineStringImpl lineString = new LineStringImpl(new PointArrayImpl(positions), 0.0);
      List<CurveSegment> segments = new ArrayList<CurveSegment>();
      segments.add(lineString);
      return new CurveImpl(this.crs, segments);
      //return this.geomFactory.getPrimitiveFactory().createCurveByPositions((List<Position>) positions);
    }

    Coordinate[] reducedPts = inputPts;
    // use heuristic to reduce points, if large
View Full Code Here

      positions.remove(2);
      LineStringImpl lineString = new LineStringImpl(new PointArrayImpl(
          positions), 0.0);
      List<CurveSegment> segments = new ArrayList<CurveSegment>();
      segments.add(lineString);
      return new CurveImpl(this.crs, segments);
      //return this.geomFactory.getPrimitiveFactory().createCurveByDirectPositions((List<Position>) positions);
    }
   
    LineStringImpl lineString = new LineStringImpl(new PointArrayImpl(
        positions), 0.0);
    List<CurveSegment> segments = new ArrayList<CurveSegment>();
    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>();
View Full Code Here

    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

    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

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

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.