Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.CircularArc


            for (int i = 0; i < ext.size(); i++) {
                cp[i * 2] = ext.getOrdinate(i, 0);
                cp[i * 2 + 1] = ext.getOrdinate(i, 1);
            }
            // figure out the other point
            CircularArc arc = new CircularArc(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
            ring = CurvedGeometries.toCircle(arc, gf, gf.getTolerance());
        } else {
            throw new IllegalArgumentException("ELEM_INFO INTERPRETAION "
                + elemInfo[2] + " not supported"
                + "for JTS Polygon Linear Rings."
View Full Code Here


        // exterior ring checks
        assertTrue(p.getExteriorRing() instanceof CircularRing);
        CircularRing shell = (CircularRing) p.getExteriorRing();
        assertTrue(CurvedGeometries.isCircle(shell));
        CircularArc arc = shell.getArcN(0);
        assertEquals(5, arc.getRadius(), 0d);
        assertEquals(new Coordinate(15, 150), arc.getCenter());
    }
View Full Code Here

        // the inner ring
        assertTrue(p.getInteriorRingN(0) instanceof CircularRing);
        CircularRing hole = (CircularRing) p.getInteriorRingN(0);
        assertTrue(CurvedGeometries.isCircle(hole));
        CircularArc arc = hole.getArcN(0);
        assertEquals(5, arc.getRadius(), 0d);
        assertEquals(new Coordinate(15, 17), arc.getCenter());
    }
View Full Code Here

            GeometryFactory gFactory, CoordinateSequence cs) {
        CurvedGeometryFactory factory;
        if (arcParameters != null && arcParameters.getLinearizationTolerance() != null) {
            double tolerance = Double.MAX_VALUE;
            if (cs != null) {
                CircularArc arc = CurvedGeometries.getArc(cs, 0);
                Circle c = new Circle(arc.getCenter(), arc.getRadius());
                tolerance = arcParameters.getLinearizationTolerance().getTolerance(c);
            }
            factory = new CurvedGeometryFactory(gFactory, tolerance);
        } else if (gFactory instanceof CurvedGeometryFactory) {
            factory = (CurvedGeometryFactory) gFactory;
View Full Code Here

TOP

Related Classes of org.geotools.geometry.jts.CircularArc

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.