Category Archives: Travelling

skos:related http://danbri.org/words/?author=2/skos.rdf#c4 Travel

WordPress Plugin: Semantic Visits

When I came back from Madrid, after the Image Decription workshop, a few days in the city, and a hefty party in Getafe, I realised I could add another country to my list of visits.

The nice folks at World66 have created a nice interface for generating an image with visited countries highlighted, but while it would be easy to check a few boxes and copy the code to somewhere on my blog pages, that wouldn’t make it possible for the semantic web to figure out where I’ve been. For that reason, I decided to mint a set of vocabulary terms for visits according to Norm Walsh’s country counting rules, collected in the visit vocabulary, and have WordPress output the information in my FOAF profile – thanks to the extensibility of my FOAF Output Plugin. Of course, the FOAF Explorer now also understands these terms, displaying maps of the world, Canada and USA when appropriate — see for yourself!

Thus, here is a new plugin, the Semantic Visits Plugin (view source).

The current version is 1.1.

Changes since 1.0:
  • Added visits to Canadian regions.
  • Fixed “wrong” code/name/etc. properties.
  • The URIs for US states are now correct, pointing at the http://www.daml.ri.cmu.edu/ont/USRegionState.daml ontology containing state definitions instead of http://www.daml.ri.cmu.edu/ont/State.daml which only contains classes and properties.

Continue reading WordPress Plugin: Semantic Visits

Summer of FOAF

This is turning out to be a very interesting summer – even if the weather here in Denmark doesn’t really make it feel like it’s actually summer.

In June I was in Madrid for the Image Description Workshop organised by SWAD-Europe, in two weeks time I’ll be at the SWAD-E workshop on Metadata for a multilingual world, held locally in Copenhagen, just today a community FOAF Camp in Twente in August was announced, and then of course there’s FOAFcon, the 1st Workshop on Friend of a Friend, Social Networking and the Semantic Web in Galway in September, also by SWAD-E.

Phew.

It’s a good thing that this coincides with a favourable tax return…

(Post title credit goes to danbri in #rdfig.)

Garmin Geko 201 and RDF

Note: This post originated outside of the weblog, but I figured it really belongs here, and it makes it easier to find.

Following in the footsteps of Matt Biddulph, I acquired a Garmin Geko 201 GPS unit, wanting to annotate my digital photographs with location information.

Matt also wrote a Python script to extract the tracklogs and waypoints from the unit and turn them into RDF statements.

I tried it out, and found I had to overcome some dependency problems, as well as do a little tweaking to get all the information I wanted.

Dependencies

The following dependencies applied to the script on my almost clean Redhat 9 laptop installation with Python 2.2.2:

  1. PyGarmin, which itself doesn’t have any dependencies. It did however need a little patching (diff for garmin.py) to keep Python from complaining.
  2. Redland, with Python interface.

The libraries should be installed in reverse order…

Waypoints tweaking

To keep my version of Python (2.2.2) from crashing, I had to fix some import statements in the original version of Matt’s garmin2rdf.py. Also, a variable name clash was resolved.

Now being able to output an RDF model, I noticed the waypoints only had a property (dc:title) for the name given to it in the unit, but no indication of the symbol used (such as a house, an airport or a building icon). I figured it would be nice to be able to use that information as well, and decided to map each symbol to a Wordnet term, through the use of the Wordnet 1.6 vocabulary namespace.

The Garmin Protocol Specification defines a number of symbols, but the Geko 201 only has a subset of these (and two additional symbols not defined in the specification).

Each numeric symbol ID is mapped to a string identifier such as sym_airport, which in turn (for the Geko 201 symbols only, it’s not easy to create a sensible mapping) is mapped to a Wordnet noun, indicating which type of place is marked. This also fits in nicely with the spacenamespace effort.

When outputting the RDF model, each waypoint is assigned an rdf:type of the wordnet term if found. If no term is found, the string identifier is output as the literal object of a http://hackdiary.com/ns/gps#symbol property, and if no string identifer is found, the symbol ID is output as a literal object of a http://hackdiary.com/ns/gps#symbolid property.

Waypoint symbol mapping

Some of the symbols used relates to verbs, but places need to be identified by nouns. The mapping below doesn’t seem perfect, comments and suggestions are welcomed, especially regarding what to call a place with information (as well as the two special Geko 201 symbols, 8255 and 8256, a closed and an open box)…

Symbol ID String identifier Wordnet term
0 sym_anchor Harbour-1
6 sym_dollar Bank-4
7 sym_fish Fishery-1
8 sym_fuel Gas_station-1
10 sym_house Home-1
11 sym_knife Restaurant-1
14 sym_skull Danger_zone-1
18 sym_wpt_dot Train_station-1
19 sym_wreck Wreck-4
150 sym_boat_ramp Lake-1
151 sym_camp Campground-1
152 sym_restrooms Restroom-1
155 sym_phone Telephone-1
156 sym_1st_aid Hospital-1
157 sym_info Information-2
159 sym_park Park-1
160 sym_picnic Park-2
161 sym_scenic Sight-2
162 sym_skiing Mountain-1
163 sym_swimming Beach-1
170 sym_car Parking_lot-1
171 sym_deer Zoo-1
173 sym_lodging Lodging-1
175 sym_trail_head Spot-1
178 sym_flag Place-1
8197 sym_golf Golf_course-1
8234 sym_building Building-1
8255 sym_8255 Place-1
8256 sym_8256 Place-1
16384 sym_airport Airport-1
16395 sym_parachute Amusement_park-1

Files

Thanks

… to mattb and danbri for making this possible.