ZedneWeb / WAIL schema

Where Am I Language (WAIL)

This document is a fairly quick, informal introduction to WAIL, a fairly simple, informal way of saying where things are (in the real world). There are probably several existing standards for representing street addresses in RDF, but WAIL is—so far as I know—unique for two reasons:

  1. It does not describe how to format a postal address
  2. It describes locations in terms of other locations

The first aspect means that WAIL cannot be used for, say, printing envelope address labels without some outside information. This gives it the freedom to describe locations in many ways and many levels of detail. The second aspect means that it is (sometimes) possible to compare two Places and determine that they are part of the same neighborhood or are in the same province or are in different countries altogether. It also means that locations can be described in ways which are ambiguous globally but are fine for local use. One can refer to the city of Boston—really, “a city called Boston”—or to the city of Boston, MA in the United States.

The ability to describe locations in terms of other locations serves allows us to reduce ambiguity without relying on an as-yet undefined URI scheme for places. The loose hierarchy restrictions allow us to describe locations in as much or as little detail as we would like. It is inspired by the Blogchalking project, which uses a similar (but stricter) system to help weblog authors find other authors near them.

Introduction

All locations in WAIL are members of the class Place. To aid in identifying places (and to reduce the chances of confusing California with California, PA), Place has several subclasses: Country, Region, State, Province, County, City, Neighborhood, and Address. These mean pretty much what you expect them to mean.

Places have three important properties: name, code, and locatedIn. A name is simply any name which is used to refer to a place. It doesn’t have to be official, although it will be more useful the more familiar it is to other people. A code is a formal identifier associated with a Place. For Countries and Regions, it must come from the ISO 3166-1 or ISO 3166-2 standards, respectively.

The last property, locatedIn, is the interesting one. It indicates that a Place is located in another Place.

Examples

By itself, WAIL can be used to state that one place is located in another place. For example, this code states that New Jersey is located in North America:

<State>
    <name>New Jersey</name>
    <locatedIn>
        <Place>
            <name>North America</name>
        </Place>
    </locatedIn>
</State>

Literally: A state called “New Jersey” is located in a place called “North America”.

The restrictions on nesting are very fluid. In the previous example, there are any number of levels which could be put between New Jersey and North America, such as the country “United States” or the region “Mid-Atlantic states”. In some areas, there may be multiple levels of the same type, such as the neighborhood Chinatown in Manhattan:

<Neighborhood>
    <name>Chinatown</name>
    <locatedIn>
        <Neighborhood>
        	<name>Manhattan</name>
        	<locatedIn>
        	    <City>
        	        <name>New York City</name>
        	    </City>
        	</locatedIn>
        </Neighborhood>
    </locatedIn>
</Neighborhood>

Literally: A neighborhood called “Chinatown” is located in a neighborhood called “Manhattan”, which is located in a city called “New York City”.

There are even times when levels appear in the reverse of the normal order:

<Country>
    <name>Vatican City</name>
    <locatedIn>
        <City>
            <name>Rome</name>
        </City>
    </locatedIn>
</Country>

Literally: A country called “Vatican City” is located in a city called “Rome”. Actually, the truth of that depends on how you are using the terms “in” and “Rome”. In a legal sense, the area of Rome does not include the Vatican City, but in the informal sense WAIL is designed to capture, it is still “in Rome”. Although WAIL frequently discusses political administrative areas, it should not be interpreted as making any statements about authority.

Finally, not all places fall into neat hierarchies. It is possible for a place to be located in two or more other places, and for none of those places to be located in any of the others. As an example, New Jersey is part of a group of states called the Tri-State Area and is also referred to as one the mid-Atlantic states. These two larger regions overlap, but each contains states that the other does not.

<State>
    <name>New Jersey</name>
    <code>US-NJ</code>
    <locatedIn>
        <Region>
            <name>Tri-State Area</name>
        </Region>
    </locatedIn>
    <locatedIn>
        <Region>
            <name>Mid-Atlantic</name>
        </Region>
    </locatedIn>
</State>

Literally: New Jersey is located in a region called “Tri-State Area” and a region called “Mid-Atlantic”.

When used in conjunction with a vocabulary for describing people, such as FOAF, WAIL can describe where people live. For example, this code states that John Smith lives in Boston.

<foaf:Person>
    <foaf:name>John Smith</foaf:name>
    <homeAddress>
        <City>
            <name>Boston</name>
        </City>
    </homeAddress
</foaf:Person>

Literally: A person named “John Smith” lives in a city called “Boston”.

This code states that I live on planet Earth:

<foaf:Person>
    <foaf:name>Dave Menendez</foaf:name>
    <homeAddress>
        <Place>
            <name>Planet Earth</name>
        </Place>
    </homeAddress>
</foaf:Person>

Literally: A person named “Dave Menendez” lives in a place called “Planet Earth”.

These examples aren’t too specific. There are several cities named Boston, for example. The more information we provide, the less ambiguous the statements gets. For example, this code states that the President lives at 1600 Pennsylvania Ave, Washington, DC:

<foaf:Person>
    <foaf:title>President of the United States of America</foaf:title>
    <homeAddress>
        <Address>
            <streetNumber>1600</streetNumber>
            <streetName>Pennsylvania Ave</streetName>
            <locatedIn>
                <City>
                    <name>Washington</name>
                    <locatedIn>
                        <Region>
                            <name>District of Columbia</name>
                            <locatedIn>
                                <Country>
                                    <code>US</code>
                                    <name>United States of America</name>
                                </Country>
                            </locatedIn>
                        </Region>
                    </locatedIn>
                </City>
            </locatedIn>
        </Address>
    </homeAddress>
</foaf:Person>

Literally: A person with the job title “President of the United States of America” lives at “1600 Pennsylvania Ave” in a city called “Washington” in a region called “District of Columbia” in the United States. Note that we can say “the United States” instead of “a country called ‘United States of America’” because the code property is unambiguous when applied to a Country.

We can go even further, and use TDL to make statements about weblogs. For example, this code indicates that the weblog “http://example.org/blog” is written in Brooklyn:

<tdl:Weblog rdf:about="http://example.org/blog">
    <dc:creator>
        <foaf:Person>
            <rdf:value>Joe Example</rdf:value>
            <homeAddress>
                <Neighborhood>
                    <name>Brooklyn</name>
                </Neighborhood>
            </homeAddress>
        </foaf:Person>
    </dc:creator>
</tdl:Weblog>

Literally: The weblog “http://example.org/blog” was created by “Joe Example”, a person who lives in a neighborhood called “Brooklyn”.

Reference

This information is also provided as a software-readable RDF Schema.

Classes
Class Subclass of Comment
Place Anything which can be considered a place, such as your house or Europe
Country Place An internationally-recognized country; anything which has an ISO country code
Region Place A subdivision of a Country with a well-known name and area
State Region A type of Region used in federal systems such as the United States
Province Region A type of Region used in federal systems such as Canada
County Region A type of Region; usually a subdivision of a larger Region containing several Cities
City Place A subdivision of Region corresponding to a center of population, such as a city, town, village, etc. Does not necessarily correspond to an actual municipal government.
Neighborhood Place A subdivision of a City
Address Place A specific home, office, apartment, place of business, etc.
Properties
Property Domain Range Comment
homeAddress Place A place where the subject lives
workAddress Place A place where the subject works
location Place A place where something is located
locatedIn Place Place A place containing this place
name Place rdf:Literal A name by which this place is known (subproperty of dc:title)
code Place rdf:Literal A well-known code by which this place is known; when applied to a Country, the value must be an ISO 3166-1 country code; when applied to a Region, the value must be an ISO 3166-2 region code (subproperty of dc:identifier)
streetName Address rdf:Literal
streetNumber Address rdf:Literal
officeNumber Address rdf:Literal
apartmentNumber Address rdf:Literal
postalCode Address rdf:Literal In the US, a ZIP or ZIP+4 code; other codes may be used elsewhere

@@ Notes

ISO 3166/MA, information about the various codes. ISO 3166-2 deals with subdivisions of countries (Regions), I found a list at GeoTags. UN/LOCODE gives codes for cities, ports, etc.

Any of these could be the basis of a URI scheme. Being able to refer to Canada as “urn:iso:3166-1:CA” or Alabama as “urn:iso:3166-2:US-AL” would undoubtedly be convenient. US states could also be referenced by their official web sites, eg. “http://www.state.nj.us/”.

Still to do: add a section about use of URI vs anonymous resources

Dave Menendez