RDF:
prefix ex: <http://www.example.org/>
prefix geo: <http://www.opengis.net/ont/geosparql#>
ex:b7 a sf:Line ;
geo:asWKT "<http://www.opengis.net/def/crs/EPSG/0/4326> LINESTRING(55.3 -160.5,55.3 -160.5)^^geo:wktLiteral .
SPARQL query:
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix geof: <http://www.opengis.net/def/function/geosparql/>
prefix sf: <http://www.opengis.net/ont/sf#>
prefix ex: <http://www.example.org/>
prefix ogis: <http://www.opengis.net/def/uom/OGC/1.0/>
select * where {
?a a sf:Line .
FILTER (geo:sfWithin(?a, "<http://www.opengis.net/def/crs/EPSG/0/4326> POLYGON((50 -170, 50 -140, 60 -140, 60 -170))"^^geo:wktLiteral))
}
In open-source edition of Virtuoso this results in the error:
Virtuoso 42000 Error RDFGE: RDF box with a geometry RDF type and a non-geometry content
Does the line also need to be declared as a geo:Geometry
?
Edit: sf:Line
is a subclass of geo:Geometry
, so I assumed it could be used in the same fashion.