[OSM-dev] Porting the mapnik stylesheet to carto

Andy Allan gravitystorm at gmail.com
Fri Nov 16 16:50:49 GMT 2012

Hi All,

Matt has mentioned it in the other thread regarding the stylesheets,
but I thought I'd expand a bit on what I'm up to.

For a long time (coming up for a year now) I've been contemplating
creating a carto version of the main stylesheets. I ported all my own
stylesheets from xml to carto and found a renewed joy in developing
them, both through the change in syntax and from the improved
toolchain (i.e. using TileMill). Also, I much prefer using git than
SVN, since it makes it much easier to try things out on a branch and
seek feedback, rather than passing patch files around or just stomping
over the main branch - or even having patches slip by because people
(like me) are uneasy just committing them and never get round to it.
Finally, I've seen so many thinly-customised versions of the OSM
stylesheets that I know people are trying and struggling to work with
them, and I have painful experience of working with multiple different
XML stylesheets (OpenCycleMap and MapQuest, to name but two).

I had no idea how few commits there had been to the stylesheets over
the last six months (pretty much none, really), so there's a good
opportunity for a conversion given the reasonably static target.
Yesterday I decided that rather than emailing the list, I would dive
in and see how much work it would be to convert them to carto, and
whether it's feasible


By a rough metric of number of mapnik rules, I'm 48% of the way
through the conversion. Currently the map looks like this:


So far so good!

I strongly believe that this is the way forward. Ideally I'd like to
finish the conversion and hit a 1.0.0 release of the new stylesheets -
one that we can swap yevaud over to without causing much kerfuffle.
Then I've already identified a bunch of improvements to the stylesheet
that will make life easier, and which I hope will attract new
cartographers (the many who are familiar with Tilemill) and/or
rekindle interest from our battle-hardened veterans.

At the very least, we'll soon have a carto version of the current
stylesheet. Regardless of what we decide wrt to old XML stylesheets -
if, say, someone else decides to take them on and develop them in the
traditional manner - I'm sure the carto version will be of interest to
many people.

Please, ask away if you have any questions. I'll keep the list posted
with how I get on.


More information about the dev mailing list