Examples of Curve


Examples of org.opengis.geometry.primitive.Curve

        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);
       
        List<OrientableCurve> curves = new ArrayList<OrientableCurve>();       
        curves.add(curve);
       
        Ring ring = primitiveFactory.createRing(curves);
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

             DirectPosition point1 = points.getDirectPosition( start, null );
             DirectPosition point2 = points.getDirectPosition( end, null );
             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());
         Surface surface = primitiveFactory.createSurface(boundary);        
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

             DirectPosition point1 = points.getDirectPosition( start, null );
             DirectPosition point2 = points.getDirectPosition( end, null );
             LineSegment segment = builder.createLineSegment( point1, point2 );
             segmentList.add( segment );
         }
         Curve curve = builder.createCurve( segmentList );
         curves.add( curve);        
         Ring ring = builder.createRing( curves );
         SurfaceBoundary boundary = builder.createSurfaceBoundary(ring );
         Surface surface = builder.createSurface(boundary);        
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

        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);
       
        List<OrientableCurve> curves = new ArrayList<OrientableCurve>();       
        curves.add(curve);
       
        Ring ring = primitiveFactory.createRing(curves);
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

        assertEquals(0.5, sB.getArea(), 1.0e-8);
        assertEquals(1.0 + 1.0 + Math.sqrt(2.0), sB.getPerimeter());

        TransfiniteSet result = sA.intersection(sB);
        assertTrue(result instanceof Curve);
        Curve curveResult = (Curve)result;
        assertEquals(0.0, curveResult.getStartParam(), 1.0e-8);
        assertEquals(Math.sqrt(2.0), curveResult.getEndParam(), 1.0e-8);
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

    assertTrue(dpos.get(4).getOrdinate(0) == 100);
    assertTrue(dpos.get(4).getOrdinate(1) == 70);
    assertTrue(dpos.get(5).getOrdinate(0) == 30);
    assertTrue(dpos.get(5).getOrdinate(1) == 20);
   
    Curve c = (Curve) this.createCurveA().getBoundary().getConvexHull();
    dpos = this.curveToPositions(c);
    assertTrue(dpos.size() == 2);
    assertTrue(dpos.get(0).getOrdinate(0) == 30);
    assertTrue(dpos.get(0).getOrdinate(1) == 20);
    assertTrue(dpos.get(1).getOrdinate(0) == 10);
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

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

//     create curve
    Curve curve = primF.createCurve(segs);   
   
    // get points from curve
    List<? extends CurveSegment> segs2 = curve.getSegments();
    Iterator<? extends CurveSegment> iter = segs2.iterator();
    PointArray samplePoints = null;
    while (iter.hasNext()) {
      if (samplePoints == null) {
        samplePoints = iter.next().getSamplePoints();
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

    // create multiprimitive object
    List<CurveSegment> curves = new ArrayList<CurveSegment>();
    curves.add( edge1 );
    curves.add( edge2 );
    curves.add( edge3 );
    Curve s = new CurveImpl(crs, curves);
   
    curves = new ArrayList<CurveSegment>();
    curves.add( edge1_1 );
    curves.add( edge2_1 );
    curves.add( edge3_1 );
    Curve s2 = new CurveImpl(crs, curves);
   
    Set<Primitive> primitives = new HashSet<Primitive>();
    primitives.add(s);
    primitives.add(s2);
    MultiPrimitiveImpl mp = (MultiPrimitiveImpl) agf.createMultiPrimitive(primitives);
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

     */
    private Curve readLineStringText(StreamTokenizer tokenizer) throws IOException, ParseException {
        List coordList = getCoordinates(tokenizer);
        LineString lineString = geometryFactory.createLineString(coordList);
        List curveSegmentList = Collections.singletonList(lineString);
        Curve curve = primitiveFactory.createCurve(curveSegmentList);
        return curve;
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.Curve

    private Curve readLinearRingText(StreamTokenizer tokenizer)
            throws IOException, ParseException {
        List coordList = getCoordinates(tokenizer);
        LineString lineString = geometryFactory.createLineString(coordList);
        List curveSegmentList = Collections.singletonList(lineString);
        Curve curve = primitiveFactory.createCurve(curveSegmentList);
        return curve;
        //List curveList = Collections.singletonList(curve);
        //return 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.