1

I am using AllegroGraph's geospatial extensions for SparQL. However I have a trouble with POINT function.

When I use HAVERSINE function for the points in the radius, I can't give custom points. However if I get a person's gelocation and give it to HAVERSINE function it works:

prefix fr:  <http://franz.com/ns/allegrograph/3.0/geospatial/>
prefix geo: <http://franz.com/ns/allegrograph/3.0/geospatial/fn/>
prefix person: <http://www.example.com/person/>

select ?fullName ?loc where{
  GEO OBJECT
  SUBTYPE "http://franz.com/ns/allegrograph/3.0/geospatial/spherical/km/-180.0/180.0/-90.0/90.0/50.0"
  HAVERSINE (?personLoc,5 KM) {
    ?person <http://www.example.com/geolocation> ?loc; 
              person:FullName ?fullName 
  }   
  where{
    person:ff5736e38246295c <http://www.example.com/geolocation> ?personLoc . 
  }     
}

The following doesn't work:

prefix fr:  <http://franz.com/ns/allegrograph/3.0/geospatial/>
prefix geo: <http://franz.com/ns/allegrograph/3.0/geospatial/fn/>
prefix person: <http://www.example.com/person/>

select ?fullName ?loc where{
  GEO OBJECT
  SUBTYPE "http://franz.com/ns/allegrograph/3.0/geospatial/spherical/km/-180.0/180.0/-90.0/90.0/50.0"
  HAVERSINE (POINT(49.13, 29.32),5 KM) {
    ?person <http://www.example.com/geolocation> ?loc; 
              person:FullName ?fullName 
  }   
  where{
  }     
}

It gives the following error :

Executing query failed: 3-ary function list is not defined

Am I doing something wrong or the problem is with AllegroGraph?

Ozan Kılıç
  • 571
  • 2
  • 8
  • Couldn't you also do this with a filter using the geo:haversine-km function? http://www.franz.com/agraph/support/documentation/v4/sparql-geo.html On a similar note, do you know how to do this same type of thing with a Prolog query in Allegrograph? I posted a question here: http://stackoverflow.com/questions/10588865/allegrograph-geospatial-prolog-queries – John Thompson May 15 '12 at 19:25

0 Answers0