@Test public void curvePolygon() throws Exception { WKTReader reader = new WKTReader2(); String WKT; Polygon polygon; Geometry geometry; WKT = "CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 143.62025166838282 -30.037497356076827))"; geometry = reader.read(WKT); assertNotNull("read curvepolygon", geometry); assertTrue( geometry instanceof Polygon ); polygon = (Polygon) geometry; assertTrue( "ring", polygon.getExteriorRing().isClosed() ); assertEquals( "segmented ring", 129, polygon.getExteriorRing().getNumPoints() ); assertEquals( "no holes", 0, polygon.getNumInteriorRing() ); WKT = "CURVEPOLYGON((144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))"; polygon = (Polygon) reader.read( WKT ); assertTrue( "ring", polygon.getExteriorRing().isClosed() ); assertEquals( "no holes", 0, polygon.getNumInteriorRing() ); WKT = "CURVEPOLYGON("+ "CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),"+ "(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))"; polygon = (Polygon) reader.read( WKT ); assertTrue( "ring", polygon.getExteriorRing().isClosed() ); assertEquals( "one holes", 1, polygon.getNumInteriorRing() ); }
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(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(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(GeometryFactory geometryFactory); Geometry read(String wellKnownText); Geometry read(Reader reader);  }