Keywords: RDF, Semantic Web, Agents, Instant Messaging, Jabber
Biography
Jo Walsh is a freelance bot writer and semantic web hacker
This project, spacenamespace, offers an XML namespace and RDF vocabulary for geospatial annotation, with a scheme to represent a physical space as a unique URI, allowing it to be referred to and shared on the semantic web. It also provides an Instant Message bot interface, which uses a web API which returns RDF data serialised in XML, to explore, augment and annotate the RDF graph model.
Collaborative Mapping with RDF
Modelling spatial locations in RDF
A RESTful XML/RDF interface for geospatial data
'mudlondon', a Jabber-based Instant Message Bot
Mapping in SVG
Developing a Collaborative Ontology for Spatial Modelling
Exchange of Personal Geodata using RDF
Bibliography
Collaborative mapping enables people and organisations to share geospatial data an 'externalise the mental map'. This project, spacenamespace, offers an XML namespace and RDF (Resource Description Framework) vocabulary for geospatial annotation, with a scheme to represent a physical space as a unique URI, allowing it to be referred to and shared on the semantic web. It also provides an IM (Instant Message) bot interface, which uses a web API which returns RDF data serialised in XML.
The application uses the FOAF (Friend Of A Friend) RDF vocabulary to attribute provenance to comments and recommendations about locations. FOAF provides a simple way to describe yourself and your social network in RDF. This can be used as the basis of a user-determined subscription service for collaborative filtering.
The application provides a basic RDF schema for the representation of physical space. Where possible, it uses public XML namespaces for properties; Dublin Core for text and date properties, the w3's geopositioning namespace to represent latitude and longitude in wgs84 format. Other geospatial metadata are incorporated into the 'spacenamespace' in an ad-hoc fashion. Properties may be specific to a UK application as postcode and Ordnance Survey National Grid reference. Other properties describe relations between spaces - 'connects', 'contains' or 'near'. The author hopes to 'hive off' some of these properties into other schemas for more fine-grained re-use as that becomes appropriate.
The 'spacenamespace' at http://space.frot.org/ provides a scheme for addressing each user-defined physical space at a unique URI. The URI enables the place to be talked about or referred to in other semantic web applications, such as the RSS picture-annotation project at http://www.picdiary.com/, where spacenamespace URIs are used to provide a location for picture collections.
The URI could stand as an abstract identifier for a place, merely guaranteeing a certain kind of uniqueness - dereferencing it is not obligatory. However, spacenamespace allows each URI to be dereferenced to show geospatial information, expressed in RDF/XML, about a space. illustrates the RDF graph model for the Hilton London Metropole; the following code block is the RDF/XML serialisation of the graph available at the URI http://space.frot.org/london/Hilton_London_Metropole#space

Fig. 1: RDF graph of location metadata for Hilton London Metropole
Properties such as postcode, latitiude and longitude are attached to the URI for the Hilton as object literals; the graph shows a connection to another subject URI, Edgware Road.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/1.0/"
xmlns:space="http://frot.org/space/0.1/"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
>
<space:space rdf:about="/london/Hilton_London_Metropole#space">
<space:os_y>181659</space:os_y>
<space:type>Hotel</space:type>
<space:name>Hilton London Metropole</space:name>
<space:lr_grid>TQ269816</space:lr_grid>
<space:postcode>W2 1JU</space:postcode>
<owl:Class>/rdf/space.owl#Hotel</owl:Class>
<space:os_x>526986</space:os_x>
<geo:long>-0.171159</geo:long>
<geo:lat>51.519585</geo:lat>
<space:connects>
<rdf:Description rdf:about="/london/Edgware_Road#space">
<space:name>Edgware Road</space:name>
<rdfs:seeAlso rdf:resource="/london/Edgware_Road#space"/>
<space:type>Road</space:type>
</rdf:Description>
</space:connects>
</space:space>
</rdf:RDF>
|
The short name for 'type', which is used by the bot interface for display, is linked to the owl:Class of the space. This is a reference to an ontology for physical space expressed in OWL (Web Ontology Language) ontology for purposes of logical reasoning - of which more below.
The RDF graph provides an ideal path-like representation of connections between places - a building connects to a street connects to another street. The modelling of connections is not very fine grained at present - it does not distinguish qualitatively between the intersection of two roads, and the connection of a house to a road via its front door; it is an area for refinement in the model. The present modelling should allow for a wiki-like refactoring of of the collaborative mental model of london. Figure 2 shows the currently-modelled connections around London's Strand.

Fig. 2: RDF graph of location connections in Central London
connections between streets around the Strand are shown as an RDF graph
The web interface to mudlondon uses the REST (REpresentational State Transfer) philosophy for XML-based data transfer across the web. Broadly, REST interfaces aim to provide the equivalent of 'web services' using standard http semantics - GET, POST, PUT, DELETE - a small set of verbs operating on a potentially infinite number of nouns, URIs. A further aim is to keep URIs semantically clear to humans - so the string http://space.frot.org/london/Covent_Garden_Market#space is human-parsable as well as bot-deferenceable
Functions provided in the API as simple POST requests include: annotation of spaces with metadata; commenting on spaces, with the commenter's name/nickname attribution stored in the FOAF namespace; storage of session state (such as current location) for each user.
Other GETtable functions are being added at request; query strings can be added to a space URI to show N nearest spaces of type X or within distance M; e.g., http://space.frot.org/london/Hilton_London_Metropole?nearest_num=2&nearest_type=Tube_Station translates as 'show me the two nearest tube stations to this location'
<space:near> <rdf:Description rdf:about="/london/Edgware_Road_Station#space"> <space:name>Edgware Road Station</space:name> <space:distance>0.38 miles</space:distance> <rdfs:seeAlso rdf:resource="/london/Edgware_Road_Station#space"/> </rdf:Description> </space:near> <space:near> <rdf:Description rdf:about="/london/Paddington_Station#space"> <space:name>Paddington Station</space:name> <space:distance>0.79 miles</space:distance> <rdfs:seeAlso rdf:resource="/london/Paddington_Station#space"/> </rdf:Description> </space:near> |
The RESTful RDF web interface answers multiple purposes. Each space has an <rdfs:seeAlso> link so the map as a whole is crawlable by a spider. These are basically 'free' sideeffects of the application, which was designed to provide a back-end 'brain' for the Instant Message bot; a pleasing illustration of the multipurposability of the semantic web.
The primary user interface to the spacenamespace is 'mudlondon', a bot which uses Jabber, the XML-based message protocol and instant messaging service. Jabber provides 'transports' to other instant message services so the same bot can talk AIM, MSN Messenger, ICQ etc; sharing state across services.
an 'XML stream' is created between user and one of a distributed network of servers. bots humans sending each other XML messages. bot-bot comms also happen this way, cf the spatial ontology building bot below.
There aren't disconnected spaces; to connect something new via the bot, the user has to start somewhere already identified.
In the bot view, the RDF model is presented like a MUD or multi-user virtual world, with options for exploring somewhat like a text-adventure game. the bot helps users navigate around the model and stores state about them; plans to add in FOAF filtering of comments here when it becomes nesc.

Fig. 3: mudlondon bot's view of the Hilton London Metropole
the bot displays the location metadata to the viewer. users can add comments and augment the metadata set through the IM client.
users can augment the RDF graph while they traverse it, using a simple 'botglot', description language with some natural language and some OO properties for adding metadata and connecting new places.

Fig. 4: mudlondon bot's view of streets around Trafalgar Square
a new connection is added to the graph, and becomes displayed in an options list, as if wandering around a text adventure.
The bot issues requests to the webserver using GET/POST requests and parses the RDF... uses this to navigate the graph, store some state on users, add comments etc. bot doesnt need any local knowledge of complete RDF model but builds it up over a series of queries.
SVG has been enthusiastically embraced by the professional GIS community. The mudlondon map is being extrapolated into an SVG map which, with SMIL and Javascript animation, can show users navigating the model, or illustrate routes across the map visually. It is an eventual aim to extend the project from RDF graph modelling to incorporate a simple subset of the OpenGIS consortium's GML, Geography Markup Language.
A collaborative map provides the framework for a collaborative ontology, describing a shared sense of how the world fits together. This is a 'codification of common sense' aim resembling the 'Upper Ontology' aspect of CYC, the commonsense reasoning engine
The spacenamespace ontology was extrapolated from the Feature Classification (FC) and Feature Designation Codes (DSG) from GNS (GEOnet Names Server) . The ontology is expressed in OWL, the w3c's ontology modelling language. At present it is a fairly simple taxonomic hierarchy; a Pub is a kind of Building and a kind of Public Space.
The ontology has been added to through personal contributions. Another IM bot-based editing interface, 'ontobot', allows the user to modify the ontology interactively. When a user of the mudlondon bot creates a new 'type' of place in the london mud, it is submitted automatically via Jabber to the ontobot for reification and inclusion in the spatial ontology; with some human pre-editing this is then presented to a voting committee which has a choice of Jabber and IRC interfaces.
There is a preliminary description of 'waypoints' in the schema which can provide a representation of GPS traces. GPS waypoints can be assigned temporary 'anonymous' URIS until they can be aligned with a particular physical space, e.g. along this street, in this shop. It is possible to building up from insectionidual traces the social patterns of a city; as illustrated beautifully at http://waag.org/realtime/
RDF provides a 'striped' syntax that allows metadata to be embedded in the headers of HTML pages. RDF feeds can be exchanged between sites; webcrawlers and aggregators can pick up embedded RDF metadata in HTML headers on documents such as http://grault.net/grubstreet/ , 'blogs', or any spatially-linked resource available on the web.
A crucial aim of this project is to contribute towards the representation of personal geodata in a simple XML encoded form sharable on the web. As such it cannot pretend to restrict who can contribute or use the data sources; thoughts of a p3p style network are geared towards sites like grubstreet which cannot afford the prohbitively signifcant sums charged in the UK for a years rental of postcode-to-coordinate conversion utilities and visual maps.
Within Europe, government policies with respect to geodata vary. The spacenamespace danish sister site, http://dk.space.frot.org/, includes 2.2 million addresses, information on administrative areas with postal codes, all in the public domain. In the UK, copyright on comparable data is tightly held by the Ordnance Survey and the Post Office. It is possible that the public re-building of this data may lead to commercial exploitation; but these concerns never held back opensource software developers from writing software aware that it may be used to run commercial services.
Location-based services are becoming more interesting and viable in a world of mobile and wireless connectivity. The author perceives a need for open exchange of personal geodata, a need for bot/agent arbitration of this data and a collaborative filtering aspect to prevent the world of the isomorphic map from filling with spam. Projects such as http://geonotes.sics.se point the way towards directed towards a wireless layer for a mudlondon-like application, where each local node holds an RDF triplestore of information about places within its range, connected to a social network which the user navigates autonomously with assistance from an IM bot.