Package org.opengis.geometry.coordinate

Examples of org.opengis.geometry.coordinate.GeometryFactory.createLineString()


        GeometryFactory geometryFactory = builder.getGeometryFactory();
        CoordinateReferenceSystem crs = builder.getCoordinateReferenceSystem();
       
        int length = array.length / crs.getCoordinateSystem().getDimension();
        PointArray closedPoints = postitionFactory.createPointArray( array, 0, length );
        LineString lines = geometryFactory.createLineString(closedPoints);       
        List<CurveSegment> segmentList = new ArrayList<CurveSegment>();
        segmentList.add(lines);
       
        Curve curve = primitiveFactory.createCurve(segmentList);
       
View Full Code Here


    List<Position> points = new ArrayList<Position>();
    points.add(primitiveFactory.createPoint( new double[]{-123.47009555832284,48.543261561072285} ));
    points.add(primitiveFactory.createPoint( new double[]{-123.46972894676578,48.55009592117936} ));
    points.add(primitiveFactory.createPoint( new double[]{-123.45463828850829,48.54973520267305} ));
    points.add(primitiveFactory.createPoint( new double[]{-123.4550070827961,48.54290089070186} ));
        LineString lineString = geometryFactory.createLineString(points);
        List curveSegmentList = Collections.singletonList(lineString);
       
        CurveImpl curve1 = (CurveImpl) primitiveFactory.createCurve(curveSegmentList);
        CurveImpl curve2 = (CurveImpl) curve1.transform(crs2);
       
View Full Code Here

    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} ));
        LineString expectedLineString = ExpectedGeomF2.createLineString(expectedPoints);
        List expectedCurveSegmentList = Collections.singletonList(expectedLineString);
       
        CurveImpl expectedCurve = (CurveImpl) expectedPrimF2.createCurve(expectedCurveSegmentList);
   
    //System.out.println(curve1);
View Full Code Here

    points1.add(primitiveFactory.createPoint( new double[]{-123.47009555832284,48.543261561072285} ));
    points1.add(primitiveFactory.createPoint( new double[]{-123.46972894676578,48.55009592117936} ));
    points1.add(primitiveFactory.createPoint( new double[]{-123.45463828850829,48.54973520267305} ));
    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 */
 
View Full Code Here

    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 */
 
View Full Code Here

    points1.add(primitiveFactory.createPoint( new double[]{-123.47009555832284,48.543261561072285} ));
    points1.add(primitiveFactory.createPoint( new double[]{-123.46972894676578,48.55009592117936} ));
    points1.add(primitiveFactory.createPoint( new double[]{-123.45463828850829,48.54973520267305} ));
    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 */
 
View Full Code Here

    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 */
 
View Full Code Here

    positions .add(start);
    positions.add(middle);
    positions.add(end);

//     create linestring from directpositions
    LineString line = geomF.createLineString(positions);

//     create curvesegments from line
    ArrayList<CurveSegment> segs = new ArrayList<CurveSegment>();
    segs.add(line);
View Full Code Here

      dp1 = (DirectPositionImpl) transform.transform(thispos, dp1);
      newpositions.add(dp1);
    }
   
    // use the new positions list to build a new curve and return it
    LineString lineString = geometryFactory.createLineString(newpositions);
    List curveSegmentList = Collections.singletonList(lineString);
    CurveImpl newCurve = (CurveImpl) primitiveFactory.createCurve(curveSegmentList);
    return newCurve;
     
  }
View Full Code Here

      dp1 = (DirectPositionImpl) transform.transform( thispos, dp1);
      newpositions.add(dp1);
    }
   
    // use the new positions list to build a new Ring and return it
    LineString lineString = geometryFactory.createLineString(newpositions);
    List curveSegmentList = Collections.singletonList(lineString);
    CurveImpl newCurve = (CurveImpl) primitiveFactory.createCurve(curveSegmentList);
    ArrayList<OrientableCurve> curveList = new ArrayList<OrientableCurve>();
    curveList.add(newCurve);
    Ring newRing = primitiveFactory.createRing(curveList);
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.