use of org.wololo.jts2geojson.GeoJSONReader in project teiid by teiid.
the class GeometryUtils method geometryFromGeoJson.
public static GeometryType geometryFromGeoJson(ClobType json, int srid) throws FunctionExecutionException {
try {
GeoJSONReader reader = new GeoJSONReader();
String jsonText = ClobType.getString(json);
Geometry jtsGeometry = reader.read(jsonText);
return getGeometryType(jtsGeometry, srid);
} catch (SQLException e) {
throw new FunctionExecutionException(e);
} catch (IOException e) {
throw new FunctionExecutionException(e);
}
}
Aggregations