Wikivoyage:RDF Expedition/Airport codes

For many destinations, it's useful to note one or more nearby airports for getting into or out of the destination. If we use some structured data through RDF, we can possibly, in the future, have enhanced search for destination based on nearby airports, or vice versa.

Representation

edit

There's a contactNearestAirport property in FOAF, but it doesn't have quite the same semantics as we're looking for. Probably the best thing is to say, "This page is about a place, and that place is near an airport with this IATA code: FOO." Using the DAML airport ontology, this might be expressed as follows:

 <> dc:spatial place:Denver .
 place:Denver wts:hasNearbyAirport <http://www.daml.org/cgi-bin/airport?DEN> .
 
 <http://www.daml.org/cgi-bin/airport?DEN> <http://www.daml.org/2001/10/html/airport-ont#iataCode> "DEN" .

With the proper prefixes, this boils down to:

@prefix airport: <http://www.daml.org/cgi-bin/airport?> .
@prefix air: <http://www.daml.org/2001/10/html/airport-ont#> .

 <> dc:spatial place:Denver .
 place:Denver wts:hasNearbyAirport airport:DEN .
 
 airport:DEN air:iataCode "DEN" .

Examples

edit

Templates

edit

Template:IATA does formatted output of the IATA code, and also has some structured RDF included. Template:ICAO does the same thing for ICAO codes.