Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.CircularString$ArcScan


        LineString ls1 = components.get(0);
        assertEquals(2, ls1.getNumPoints());
        assertEquals(new Coordinate(10, 45), ls1.getCoordinateN(0));
        assertEquals(new Coordinate(20, 45), ls1.getCoordinateN(1));

        CircularString cs = (CircularString) components.get(1);
        assertArrayEquals(new double[] { 20.0, 45.0, 23.0, 48.0, 20.0, 51.0 },
                cs.getControlPoints(), 0d);

        LineString ls2 = components.get(2);
        assertEquals(2, ls2.getNumPoints());
        assertEquals(new Coordinate(20, 51), ls2.getCoordinateN(0));
        assertEquals(new Coordinate(10, 51), ls2.getCoordinateN(1));
View Full Code Here


        assertEquals(new Coordinate(10, 78), ls.getCoordinateN(0));
        assertEquals(new Coordinate(10, 75), ls.getCoordinateN(1));
        assertEquals(new Coordinate(20, 75), ls.getCoordinateN(2));
        assertEquals(new Coordinate(20, 78), ls.getCoordinateN(3));

        CircularString cs = (CircularString) components.get(1);
        assertArrayEquals(new double[] { 20, 78, 15, 80, 10, 78 }, cs.getControlPoints(), 0d);
    }
View Full Code Here

        assertEquals(3, ls.getNumPoints());
        assertEquals(new Coordinate(6, 10), ls.getCoordinateN(0));
        assertEquals(new Coordinate(10, 1), ls.getCoordinateN(1));
        assertEquals(new Coordinate(14, 10), ls.getCoordinateN(2));

        CircularString cs = (CircularString) components.get(1);
        assertArrayEquals(new double[] { 14, 10, 10, 14, 6, 10 }, cs.getControlPoints(), 0d);
    }
View Full Code Here

        assertEquals(new Coordinate(7, 15), ls.getCoordinateN(3));
        assertEquals(new Coordinate(11, 10), ls.getCoordinateN(4));
        assertEquals(new Coordinate(21, 10), ls.getCoordinateN(5));
        assertEquals(new Coordinate(27, 30), ls.getCoordinateN(6));

        CircularString cs = (CircularString) components.get(1);
        assertArrayEquals(new double[] { 27, 30, 25, 27, 20, 30 }, cs.getControlPoints(), 0d);

        // the inner ring
        assertTrue(p.getInteriorRingN(0) instanceof CircularRing);
        CircularRing hole = (CircularRing) p.getInteriorRingN(0);
        assertTrue(CurvedGeometries.isCircle(hole));
View Full Code Here

   
    public void testParse() throws Exception {
        GML3MockData.arcWithPosList(document, document);
        LineString lineString = (LineString) parse();
        assertTrue(lineString instanceof CircularString);
        CircularString cs = (CircularString) lineString;

        double[] controlPoints = cs.getControlPoints();
        assertEquals(1.0, controlPoints[0]);
        assertEquals(1.0, controlPoints[1]);
        assertEquals(2.0, controlPoints[2]);
        assertEquals(2.0, controlPoints[3]);
        assertEquals(3.0, controlPoints[4]);
View Full Code Here

    public void testParse() throws Exception {
        GML3MockData.arcStringWithPosList(document, document);
        LineString lineString = (LineString) parse();
        assertTrue(lineString instanceof CircularString);
        CircularString cs = (CircularString) lineString;

        double[] controlPoints = cs.getControlPoints();
        assertEquals(1.0, controlPoints[0], 0d);
        assertEquals(1.0, controlPoints[1], 0d);
        assertEquals(2.0, controlPoints[2], 0d);
        assertEquals(2.0, controlPoints[3], 0d);
        assertEquals(3.0, controlPoints[4], 0d);
View Full Code Here

    CurvedGeometryFactory curvedFactory = new CurvedGeometryFactory(geometryFactory,Double.MAX_VALUE);
   
    PackedCoordinateSequence coords = new PackedCoordinateSequence.Double(
       new double[]{10,14,6,10,14,10}, 2 );
   
    CircularString arc = (CircularString) curvedFactory.createCurvedGeometry(coords);
    // createCurve end   
}
View Full Code Here

    // wktCurve start
    GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
    CurvedGeometryFactory curvedfactory = new CurvedGeometryFactory(Double.MAX_VALUE);
   
    WKTReader2 reader = new WKTReader2(curvedfactory);
    CircularString arc = (CircularString) reader.read("CIRCULARSTRING(10 14,6 10,14 10)");
    // wktCurve end   
}
View Full Code Here

   
    public void testParse() throws Exception {
        GML3MockData.arcWithPosList(document, document);
        LineString lineString = (LineString) parse();
        assertTrue(lineString instanceof CircularString);
        CircularString cs = (CircularString) lineString;

        double[] controlPoints = cs.getControlPoints();
        assertEquals(1.0, controlPoints[0]);
        assertEquals(1.0, controlPoints[1]);
        assertEquals(2.0, controlPoints[2]);
        assertEquals(2.0, controlPoints[3]);
        assertEquals(3.0, controlPoints[4]);
View Full Code Here

    public void testParse() throws Exception {
        GML3MockData.arcStringWithPosList(document, document);
        LineString lineString = (LineString) parse();
        assertTrue(lineString instanceof CircularString);
        CircularString cs = (CircularString) lineString;

        double[] controlPoints = cs.getControlPoints();
        assertEquals(1.0, controlPoints[0], 0d);
        assertEquals(1.0, controlPoints[1], 0d);
        assertEquals(2.0, controlPoints[2], 0d);
        assertEquals(2.0, controlPoints[3], 0d);
        assertEquals(3.0, controlPoints[4], 0d);
View Full Code Here

TOP

Related Classes of org.geotools.geometry.jts.CircularString$ArcScan

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.