[OSM-dev] Rendering like google maps in Mapnik : Customising osm.xml

Andy Allan gravitystorm at gmail.com
Wed Jan 28 18:02:00 GMT 2009


On Wed, Jan 28, 2009 at 5:39 PM, Andy Deakin <andy.deakin at pcmend.net> wrote:

> I have setup my own mapnik server, but have been struggling with getting
> the osm.xml stylesheet right.

Stick at it, it's well worth it.

> Does anyone have an osm.xml file which looks more vibrant in colour than
> the default mapnik one?

Bits and pieces of the cycle map have been primary colours in the
past. It's just a question of changing the hex colour values and lots
of find+replace to make sure you get e.g. all the primary road
definitions.

> Is there the functionality in the osm.xml file to give the same road
> type in different countries different colours? E.g. Motorways in the UK
> are always blue, but in most of Europe are orange.

Not directly. Dave Stubbs played around with this a year ago - using
country polygons to add another column to postgis with the correct
country (or maybe it was just straight intersection tests on the
polygons in the select statement, I forget). But the main problem is
that you then copy+paste all 6,500 lines of the stylesheet and twiddle
the colours again. There's probably better ways of doing it to use few
Lines Of Style, but it's still mainly twice as many colours to worry
about.

Cheers,
Andy




More information about the dev mailing list