OSM to the rescue

A few years back I made a map of Córdoba's downtown by hand, using inkscape, to be used by people coming to a free software conference. You can watch the results here, but I can assure you that if it weren't for the mostly squarish/triangularish shape of Córdoba's blocks, it would have been very hard to do it.

Today someone asked me for the .svg file to do something similar. I searched and searched through my files, but couldn't find the originals. Then I remembered one of my current projects, which I'll mention bellow, which is based on OpenStreetMaps's data. So I told him to find the region he wanted and export it to PNG or something with the 'export' tab. Then, thoughts kept coming, and I even managed to remember MapOsMatic, which lets you select a region in OSM's maps and generate not only a nice printable map in several formats, but also a street index for the back of the same map (even as .csv, so you could have a .png of the map for your site and populate a database to look for streets). Even more, I generated a map that covers a slightly bigger area than my humble attempt from 4 years ago. So, there.

The project I'm toying now with is to make a bird's view map of the region I live now. This map will have only the towns and the main interconencting ways between them, much like maps like this one12. For that I first tried using josm to download the data from the region, filter out the small routes, and work from there, but the region is quite big, and OSM's servers sensibly refuse to dump so much data at once. Asking in freenode's #openstreetmap3 channel, they told me I could use XAPI to filter out only the data I wanted. So that's what I did: downloaded all roads from highways down to secondary roads, and rivers. While I was at it, I also downloaded the coastlines, because I'm close to the sea and there are also several lakes around. So, without further ado, here are the links I used:

wget -S -O routes.osm 'http://www.informationfreeway.org/api/0.6/way[highway=motorway|motorway_link|trunk|primary|secondary][bbox=5.5,43,8.5,45.5]'
wget -S -O routes.osm 'http://www.informationfreeway.org/api/0.6/way[waterway=river][bbox=5.5,43,8.5,45.5]'
wget -S -O routes.osm 'http://www.informationfreeway.org/api/0.6/way[natural=coastline][bbox=5.5,43,8.5,45.5]'

Notes: I also wanted waterway=riverbank, but for some reason the server never answered such a request. This does not include town names, hmmm... I could also have included historic=* and tourism=*. I might as well. There might be some follow ups to this project.

  1. RANT: the webmaster of the official turism site decided that is a good idea to put most of the contents in a flash applet, so I can't actually link to the map I wanted. Instead, here's a map from a neighbouring province, San Luis. 

  2. If you follow the link, yes, you'll get a 'site not found' error. That's because it's actually a curse to that site's webmaster 'encoded' into an url. 

  3. If you try to get into #osm, you're redirected to #joomla. Go fugure.