application/rdf+xml

Mountain biking and Semantic Web

Today I finished the first step or marring two things I really like: mountainbiking and semantic web.

In the past two weeks I hacked a little Google Maps application called #B4maps which shows some tracks driven lately. Tracks and the Images used to annotate some waypoints are stored in some semi-good XML file…

Today I also finished some XML/XSLT stuff to represent the tracks in an general semantic way using the Locative Packets approach. With some help from #swig I figured out how to preserve the order of the Packets… a bunch of packets is worth nothing without an ordering!

So what we got? An application to show and edit tracks on a map: #B4maps (see its features), a webservice to represent this tracks using RDF, a nice query (which help from Dave Beckett) to figure out the waypoints:


PREFIX geo: <http ://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX rdf: <http ://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dc: <http ://purl.org/dc/elements/1.1/>
PREFIX l: <http ://locative.net/2004/packet/loc#>
PREFIX m: <http ://purl.org/dc/dcmitype/>

SELECT ?lat, ?long, ?img
WHERE { ?seq a rdf:Seq .
?seq ?prop ?x ?x geo:lat ?lat . ?x geo:long ?long . OPTIONAL { ?x l:media ?img } }
ORDER by ?prop

And a nice reuse of an existing web service to query rdf data.

My next step will be to move the #B4maps internal storage away from my legacy xml flat file stuff to a RDF backed storage and to experiment with the Redland PHP binding on my webhosters server.


About this entry