subtype in Geospatial Sparql error

96 views Asked by At

I use SPARQL to request:

select distinct ?place ?label ?lat ?lng 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(105.8522, 21.0287), 1.0 KM) {
                                            ?place vtio:hasGeoPoint ?loc. 
                                            ?place rdf:type vtio:FastFood.
                                            ?place rdfs:label ?label. 
                    ?place vtio:hasLatitude ?lat.
                                            ?place vtio:hasLongtitude ?lng.
                    } where {
                    } FILTER(lang(?label)='vn')
                                          } LIMIT  5

But when i execute it, There is an error:

Executing query failed:
QUERY FAILED: Geospatial subtype
"http://franz.com/ns/allegrograph/3.0/geospatial/spherical/km/-180.0/180.0/-90.0/90.0/50.0"
not found.

I use allegrograph 4.12.1 . So, What SUBTYPE I should use, thank you!

1

There are 1 answers

0
Vu Thai Binh On

You have to register spherial type first. I did it through JENA API:

URI sphericalTypeURI=conn.registerSphericalType(50,"km");

where conn is current connection (instance of AGRepositoryConnection)