I have polygon string ,how can I find geometry by giving polygon as input,Is there any function like we have ST_GeometryFromText('POLYGON ....) in postgis ,which give geometry.
1 Answer
From the documentation use a WKTReader
:
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
WKTReader reader = new WKTReader(geometryFactory);
Point point = (Point) reader.read("POINT (1 1)");