Openstreetmap event calendar on a map

November 18, 2009

As someone who is interested in Openstreetmap I’d like to know when an OSM-event takes place somewhere near me.

There is an event calendar on the OSM wiki where people publish the dates of OSM mapping parties and other osm meetings.

It is nice that there is a central place where to look for such meetings. The problem with this list is however, that events all around the world are shown there and it is not easy to find events that take place in a specific region.

The only way to limit the events by a region is to use an iCal feed for a specific region. The region must be supplied in coordinates (,51.278,0.251,51.745)  and you need a client to display the ics data. Most people won’t use this feature.

In my opinion the best place for this OSM event calendar would be an OSM map. So I decided to put the events as markers on an OSM map. Displaying maps and adding markers is really easy thanks to All you need is a bit of javascript and a text file containing the markers.

The hard thing is to get the coordinates of the events. For this task I coded the following in perl.
The events in the calendar usually only contain short descriptions of the events and a link to a more detailed page (e.g. Nov 17 München monthly meeting). I first tried to get the coordinates from the city names. Such a feature is provided by  nominatim. You can query the service by http GET requests and the answer can be return in JSON format (e.g.ünchen+Germany&format=json). This worked quite well with names that are unique, but it is impossible to decide which coordinates are correct if multiple results are returned.
To get the coordinates anyway I did a trick. Each event usually links to a page in the OSM wiki where more details to this event are displayed. Usually these wiki pages contain maps showing the region where the event takes place. In the soucecode of the wiki page you find the coordinate of the region by searching for the strings “lon=” and “lat=”.

This is how the map looks like:

A working version of the map can be found here

I know that the map is not perfect. It is just hacked together in a couple of hours. There probably a lot of bugs in the map (e.g. special characters are not shown correct,…) and not all coordinates are correct. But I think you get a nice overview of where events take place and which of the events are in the near future.

I hope this example shows that it would be nice to have this feature in the OSM wiki or maybe even on the official map (to get more people in touch with the OSM community). This could be implemented very easily if all events would have been provided with coordinates. Maybe a good way to implement this would be via GeoRSS. An example can be found at the openlayers website.

iCal feed


%d bloggers like this: