Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.CompoundCurve


    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


                                    Double.MAX_VALUE);
                        } else if (converted instanceof LinearRing) {
                            result = new CompoundRing(Arrays.asList(converted),
                                    ((LineString) source).getFactory(), Double.MAX_VALUE);
                        } else {
                            result =  new CompoundCurve(Arrays.asList(converted),
                                    converted.getFactory(), Double.MAX_VALUE);
                        }
                    }
                    if (result != null) {
                        copyUserProperties(sourceGeometry, result);
View Full Code Here

TOP

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

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.