Hack 95. Model Interactive Spaces
Make a Multi
Once upon a time, there was a globe in a "room" in a MUD, now lost in the misty dawn of the Internet. This globe contained a
The map is the key to the MUD, and popular ones have satellite web sites featuring maps created by players. MUD maps are more
cartogrammatic
than
Figure 9-5 shows a classic MUD map, from an online world based on the
Discworld
Figure 9-5. Map of a small portion of the Discworld MUD (http://maps.discworld.nu/maps/aam.gif)
In a MUD, each room or
We can use geodata on the Web to build a local "world as a MUD," to build simple interactive models that
To build a model of the world, we need a simple framework of common terms of reference, a taxonomy or "ontology" of physical spaces that world-builders can share. Many different spatial ontologies exist, from the heavily complex and descriptive, to the domain-specific. One interesting challenge over the
9.4.1. Naming SpacesThe RDF model, shorthand for the unevocative Resource Description Framework , is an ideal candidate for storing interactive models of space. Like the route-oriented or connection-oriented model of space, it represents a graph of nodes with lines or arcs connecting them. RDF's companion standard, OWLthe Web Ontology Language allows you to describe a taxonomy and publish it on the Web for others to use. In the RDF model, as shown in Figure 9-6, each node and arc is labeled with an HTTP URL, just like an ordinary web address, except there doesn't have to be anything on the other end of the address: it just has to be unique and always refer to the same thing. Figure 9-6. A simple RDF graph describing a physical space
Spacenamespace is an evolving spatial ontology, initially based on the classifications extracted from GEONet data [Hack #84] . It was written as part of a spatial annotation project, mudlondon ; the ontology was expanded by some of the MUD users: <owl:Class rdf:about="http://frot.org/space/0.1/Building"> <rdfs:label>a Building</rdfs:label> <rdfs:subClassOf rdf:resource="http://frot.org/space/0.1/Hypsographic"/> </owl:Class> <owl:Class rdf:about="http://frot.org/space/0.1/Public_Building"> <rdfs:label>a Public Building</rdfs:label> <rdfs:subClassOf rdf:resource="http://frot.org/space/0.1/Building"/> </owl:Class> <owl:Class rdf:about="http://frot.org/space/0.1/Recreational_Venue"> <rdfs:label>a kind of Public Building intended for recreational purposes, like a cinema or club.</rdfs:label> <rdfs:subClassOf rdf:resource="http://frot.org/space/0.1/Public_Building"/> </owl:Class>
This formidable-looking bit of RDF says, "A Building is a kind of Hypsographic Feature."
Hypsographic
is a top-level classification from GEONet and just means something that's found on land. It goes on: "A Public Building is a kind of Building, and a Recreational
9.4.2. Making Models Without Maps
mudlondon
is a London model, built collaboratively by people who used it from different sources of geo-encoded data on the Web. A geocoded model of London's
mudlondon has an Instant Message interface, using the Jabber protocol (see http://jabber.org) to connect to different IM systems like AOL Instant Messenger. To explore it, a person just talks to it; wandering around it is like exploring a text adventure game: "You are on Charing Cross Road. You see a Tube Station. You can walk to: Shaftesbury Avenue or Trafalgar Square."
The rules for wandering around
mudlondon
are simple. To build a new space, or connect to an old one, the user types "connect Placename." If a place named Placename is found in the model, it's connected from the user's current location; if not, it is created, and the user is asked "What type of place is this?" (e.g., Building, Park). The bot takes a decent stab at fitting the new type into the spatial ontology and puts new types of places into a pool for later examination by its human
mudlondon
was written partly as an answer to the "collaborative mapping" problem; with no free sources of geo-encoded data, how can we build maps for
9.4.3. Making Models with MapsIn the U.S., no such problem exists; geodata is available with staggering density from the Geological Survey, the Census Bureau, and other government agencies. By federal law, all data created by the government must be free of copyright and made available for no more than the actual cost of redistribution. Most of the public agencies have interpreted the "cost of redistribution" for web-based data to be "zero," pleasantly ignoring details of server maintenance and bandwidth costs.
To "bootstrap" an interactive RDF model of San Francisco, it was possible to use the TIGER/Line data set to extract a listing of all the streets in San Francisco and calculate the points at which they intersect with other streets. The
Geo::TigerLine
Perl module available on CPAN provides a detailed, low-level interface to the TIGER database. The code to extract an RDF model from TIGER, along with other spatial RDF
So now we have the basis of a spatially accurate interactive environment. What use is it?
mudlondon
was written as an evocative prototype, to
In our interactive RDF model of San Francisco,
metasf
, we start out with an "
So the more refined "world as a MUD" model treats each line connecting nodesan exit, an intersectionas if it were a node in itself. From Cortland Street, you can reach the intersection of Cortland and Mission, which is annotated with coordinates, as shown in Figure 9-7. Figure 9-7. A refined RDF model of spatial connections
With a geo-annotated model of how streets connect, we can build a lot of interesting things. For example, the city's public transport providers publish route information on their web sites that can be scraped; bus stops tend to be identified by intersections, and subway
A file containing the physical locations of wireless access points, either published by a community network
Route finding and public transport planning is harder. Sadly, TIGER/Line, being a product of the U.S. Census Bureau, which is more
9.4.4. Interactive InterfacesGiven a set of spatial graphs, either contained in a flat file or available via a web-service interface, a bot or agent can present a "conversational" view of the world model. Source code and advice for RDF bots that will allow you to wander around a spatial graph model are also available from http://space.frot.org/. |