Search in sources :

Example 1 with WKTReader

use of org.apache.jena.geosparql.implementation.parsers.wkt.WKTReader in project jena by apache.

the class WKTDatatype method read.

@Override
public GeometryWrapper read(String geometryLiteral) {
    WKTReader wktReader = WKTReader.extract(geometryLiteral);
    Geometry geometry = wktReader.getGeometry();
    String srsURI = wktReader.getSrsURI();
    DimensionInfo dimensionInfo = wktReader.getDimensionInfo();
    return new GeometryWrapper(geometry, srsURI, URI, dimensionInfo, geometryLiteral);
}
Also used : Geometry(org.locationtech.jts.geom.Geometry) DimensionInfo(org.apache.jena.geosparql.implementation.DimensionInfo) GeometryWrapper(org.apache.jena.geosparql.implementation.GeometryWrapper) WKTReader(org.apache.jena.geosparql.implementation.parsers.wkt.WKTReader)

Aggregations

DimensionInfo (org.apache.jena.geosparql.implementation.DimensionInfo)1 GeometryWrapper (org.apache.jena.geosparql.implementation.GeometryWrapper)1 WKTReader (org.apache.jena.geosparql.implementation.parsers.wkt.WKTReader)1 Geometry (org.locationtech.jts.geom.Geometry)1