Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.CompoundRing


        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


                        }
                    } else {
                        LineString converted = Converters.convert(source, LineString.class);
                        if (converted.isEmpty()) {
                            List<LineString> components = new ArrayList<>();
                            result = new CompoundRing(components, converted.getFactory(),
                                    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);
                        }
View Full Code Here

TOP

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

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.