SPARQL Updates

April 26th, 2005 12:40 AM

Libby’s doing some interesting stuff with SPARQL Cross-Searching using Joseki and client-side Javascript.

Spurred on by this, I’ve put up v1.014 of RDF::Query on the code page (still no project page — sorry!), which will run this query:

PREFIX foaf: <>
PREFIX dcterms: <>
PREFIX geo: <>
PREFIX mygeo: <>
SELECT ?image ?point ?name ?lat ?long
?image rdf:type foaf:Image .
?image dcterms:spatial ?point .
?point geo:lat ?lat .
?point geo:long ?long .
?point foaf:name ?name .
FILTER mygeo:distance("mile", ?point, 41.8, -71.3) < 10 .

You still can’t order the points by the distance in a very quick way, but this will allow you to get all of the points within a certain radius, or get a fixed number of points within the radius (as shown) if you just want a sampling of points.