Page MenuHomePhabricator

Create services to implement search around a point and within a box
Closed, ResolvedPublic

Description

The services should allow to search around certain point and within box bounded by two points.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Around syntax:

SELECT * WHERE {
   wd:Q90 wdt:P625 ?parisLoc .

   SERVICE wikibase:around {
     ?place wdt:P625 ?location .
     bd:serviceParam wikibase:center ?parisLoc .
     bd:serviceParam wikibase:radius "1" .
   }
 }

Box syntax:

SELECT WHERE {
   SERVICE wikibase:box {
     ?place wdt:P625 ?location .
     bd:serviceParam wikibase:cornerSouthWest "Point(48.0 2.0)"^^ogc:wktLiteral .
     bd:serviceParam wikibase:cornerNorthEast "Point(49.0 3.0)"^^ogc:wktLiteral .
   }
 }