Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.MultiCurve


    public void testLineStringToMultiCurve() throws Exception {
        Geometry ls = new WKTReader().read("LINESTRING(0 0, 10 10)");
        Converter converter = getConverter(ls, CurvedGeometry.class);
        MultiCurvedGeometry curve = converter.convert(ls, MultiCurvedGeometry.class);
        assertTrue(curve instanceof MultiCurve);
        MultiCurve mc = (MultiCurve) curve;
        assertEquals(1, mc.getNumGeometries());
        assertEquals(ls, mc.getGeometryN(0));
    }
View Full Code Here


                                            ((CurvedGeometry) geom).getTolerance());
                                }
                                components.add(geom);
                            }
                            GeometryFactory factory = ((Geometry) source).getFactory();
                            result = new MultiCurve(components, factory, tolerance);
                        }
                    } else {
                        LineString converted = Converters.convert(source, LineString.class);
                        if (converted.isEmpty()) {
                            List<LineString> components = new ArrayList<>();
View Full Code Here

TOP

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

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.