Sunday, 8 August 2010

Mapping - OSM and Mapnik

I have been playing with mapnik quite a bit lately - I decided I needed to learn how to use it better to improve my townguide program.
I have been very impressed with Lonvia's Hiking Map, which is an overlay showing hiking routes on top of a standard OpenStreetMap map, and thought I could do something similar.

My first effort was a map showing the locations of supermarkets (handy when we go on holiday so we know where to go to stock up on provisions) - It can be seen here.
Someone has imported a lot of powerline data from Ordnance Survey into my local area, so I tried a Power Station Map.  These maps all have an 'about' link showing how they work.

I have produced a similar one to show the use of Ordnance Survey OpenData in the OpenStreetMap map of the UK, which can be seen here.

More recently I have wanted to produce maps that include contours, and also allow me to plot GPX traces to show where we have been.   To do this I have imported the SRTM data for the UK into my postgresql database using the technique described here.   This allows me to render an Openstreetmap map with contours, which is useful for the countryside.
Adding a GPX trace over the top was a bit difficult - I wanted to do it in python to save hard coding the path to the GPX file in the mapnik style file, but I haven't managed to do that - I ended up adding a GPX layer to my mapnik style file using the mapnik ogr plugin.   The result can be seen here.
Post a Comment