我正在使用 AllegroGraph 的 SparQL 地理空间扩展。但是我在使用 POINT 功能时遇到了麻烦。
当我对半径中的点使用 HAVERSINE 函数时,我无法给出自定义点。但是,如果我得到一个人的地理位置并将其提供给 HAVERSINE 函数,它就可以工作:
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 .
}
}
以下不起作用:
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{
}
}
它给出了以下错误:
执行查询失败:未定义三元函数列表
我做错了什么还是 AllegroGraph 有问题?