@Test public void testMultiSurfaceStraightPolygon() throws Exception { String wkt = "MULTISURFACE (((0 0, 1 0, 1 4, 0 0)), CURVEPOLYGON (COMPOUNDCURVE (CIRCULARSTRING (0 2, 7 5, 2 10), (2 10, 0 2)), COMPOUNDCURVE (CIRCULARSTRING (3 9, 6 5, 3 2), (3 2, 3 9))))"; Geometry geometry = new WKTReader2().read(wkt); MultiSurface ms = (MultiSurface) geometry; assertEquals(2, ms.getNumGeometries()); assertFalse(ms.getGeometryN(0) instanceof CurvePolygon); assertTrue(ms.getGeometryN(1) instanceof CurvePolygon); }
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);  }