@Test public void testParseMulticurve() throws Exception { WKTReader reader = new WKTReader2(); String WKT = "MULTICURVE EMPTY"; MultiLineString ml = (MultiLineString) reader.read(WKT); assertTrue(ml.isEmpty()); WKT = "MULTICURVE((0 0, 5 5),CIRCULARSTRING(4 0, 4 4, 8 4))"; ml = (MultiLineString) reader.read(WKT); assertEquals(2, ml.getNumGeometries()); assertTrue(ml.getGeometryN(0).getClass() == LineString.class); assertTrue(ml.getGeometryN(1) instanceof CircularString); WKT = "MULTICURVE((100 100, 120 120), COMPOUNDCURVE(CIRCULARSTRING(0 0, 2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)))"; ml = (MultiLineString) reader.read(WKT); assertEquals(2, ml.getNumGeometries()); assertTrue(ml.getGeometryN(0).getClass() == LineString.class); assertTrue(ml.getGeometryN(1) instanceof CompoundRing); }
public Geometry read(String wellKnownText) throws ParseException { StringReader reader = new StringReader(wellKnownText); try { return read(reader); } finally { reader.close(); } }
WKTReader2 extends WKTReader { public Geometry read(String wellKnownText) throws ParseException { StringReader reader = new StringReader(wellKnownText); try { return read(reader); } finally { reader.close(); } } }
WKTReader2 extends WKTReader { public Geometry read(String wellKnownText) throws ParseException { StringReader reader = new StringReader(wellKnownText); try { return read(reader); } finally { reader.close(); } } WKTReader2();  WKTReader2(double tolerance);  WKTReader2(GeometryFactory geometryFactory); }
WKTReader2 extends WKTReader { public Geometry read(String wellKnownText) throws ParseException { StringReader reader = new StringReader(wellKnownText); try { return read(reader); } finally { reader.close(); } } WKTReader2();  WKTReader2(double tolerance);  WKTReader2(GeometryFactory geometryFactory); Geometry read(String wellKnownText); Geometry read(Reader reader); }
WKTReader2 extends WKTReader { public Geometry read(String wellKnownText) throws ParseException { StringReader reader = new StringReader(wellKnownText); try { return read(reader); } finally { reader.close(); } } WKTReader2();  WKTReader2(double tolerance);  WKTReader2(GeometryFactory geometryFactory); Geometry read(String wellKnownText); Geometry read(Reader reader);  }