Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.CurvedGeometry


  }
 
    public void testLineStringToCurve() throws Exception {
        Geometry ls = new WKTReader().read("LINESTRING(0 0, 10 10)");
        Converter converter = getConverter(ls, CurvedGeometry.class);
        CurvedGeometry curve = converter.convert(ls, CurvedGeometry.class);
        assertTrue(curve instanceof CompoundCurve);
        CompoundCurve cc = (CompoundCurve) curve;
        assertEquals(1, cc.getComponents().size());
        assertEquals(ls, cc.getComponents().get(0));
    }
View Full Code Here


    public void testLinearRingToCurve() throws Exception {
        Geometry ls = new WKTReader().read("LINEARRING(0 0, 10 10, 10 0, 0 0)");
        Map<String, String> userData = Collections.singletonMap("test", "value");
        ls.setUserData(userData);
        Converter converter = getConverter(ls, CurvedGeometry.class);
        CurvedGeometry curve = converter.convert(ls, CurvedGeometry.class);
        assertTrue(curve instanceof CompoundRing);
        CompoundRing cr = (CompoundRing) curve;
        assertEquals(1, cr.getComponents().size());
        assertEquals(ls, cr.getComponents().get(0));
        assertEquals(userData, cr.getUserData());
View Full Code Here

TOP

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

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.