Skip to content

GeoSPARQL sfWithin or sfContains #1415

Answered by tuukka
ktk asked this question in Q&A
Jul 25, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

The list of the currently implemented geof functions seems to be short and only support geometries that are points: geof:distance (?x, ?y), geof:latitude (?x), geof:longitude (?x) [source]

As I understand it, you should use some tool to pre-calculate for your dataset(s) any other relations that you need in your queries. E.g. osm2rdf produces triples for the following relations: ogc:sfContains, ogc:sfCovers, ogc:sfIntersects, ogc:sfEquals, ogc:sfTouches, ogc:sfCrosses, ogc:sfOverlaps [source]

In the end, a query like this works for the data from OSM: https://qlever.cs.uni-freiburg.de/osm-planet/uqRIdh

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX osmkey: <https://www.openstree…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ktk
Comment options

Answer selected by ktk
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants