sttl.navlab.glocate.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
#
# Geolocate resource on a map given lat et long
#
prefix p:
prefix o:
template st:glocate {
st:call-template(st:gmap, ?in, ?lat, ?lon, aggregate(?elem))
}
where {
?in a o:Place
optional {
?in o:place [
p:longitude ?lon ;
p:latitude ?lat] }
optional {
?in p:longitude ?lon ;
p:latitude ?lat }
# search all other Place resources
optional {
select (xt:list(?res, ?lat, ?lon) as ?elem) ?res
where {
bind (st:get(st:dataset) as ?g)
graph ?g {
?res p:longitude ?lon ; p:latitude ?lat
}
}
}
filter(! bound(?res) || ?in != ?res)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy