Page MenuHomePhabricator

[EPIC] Support geo-coordinate search for WDQS
Closed, ResolvedPublic

Description

Since Blazegraph 2.0 provides implementation for geospatial indexing, we want to have support for geospatial operations in WDQS.
Minimal requirement for supported operations:

  • Filter items on coordinate being within certain radius of given point
  • Filter items on coordinate being within certain bounding box
  • Have function for distance between coordinates

Event Timeline

Smalyshev claimed this task.
Smalyshev raised the priority of this task from to Medium.
Smalyshev updated the task description. (Show Details)
Smalyshev subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

So queries won't have to be written like this any more ? :-)

Wikidata:SPARQL_query_service/queries#Working with co ordinates

  • and eg. counting may be possible within a bigger radius ?

In Blazegraph 2.0 the geospatial search looks like:

SELECT ?res WHERE {
SERVICE geo:search {
     ?res geo:search "inRectangle" .
     ?res geo:predicate example:locatedIn .
     ?res geo:spatialRectangleUpperLeft "0.00001#0.00002" .
     ?res geo:spatialRectangleLowerRight "0.00003#0.00003" .
   }
}

or:

SELECT ?res WHERE {
SERVICE geo:search {
     ?res geo:search "inCircle" .
     ?res geo:predicate example:locatedIn .
     ?res geo:spatialCircleCenter "0.00002#0.00002" .
     ?res geo:spatialCircleRadius "0.1" .
   }
}

So I think we can have something similar. I imagine indexing will also be better since now the query examples probably do not use indexes at all.