[OSM-dev] Converting OSM Mapnik stylesheet to Cascadenik or Carto

Graham Jones grahamjones139 at gmail.com
Wed Jul 27 21:30:51 BST 2011

Andy, Josh,
I have been experimenting with Carto for OSM (outside of tilemill because I
couldn't get the tilemill postgresql datasource working when I tried it).
I picked Carto over Cascadenik for the same reason - that it seems to be
developing actively, and is reported to be significantly faster.

I think Andy is right about the datasource bits not being very neat - I have
not worked out how to use variables in the JSON datasource definitions so
there is a lot of repetition, but the CSS styling does seem elegant compared
to standard mapnik XML - I particularly like being able to draw the road
fill colour and casing in a couple of lines and do simple arithmetic with

That said, I have only tried pretty simple map rendering of the features I
am interested in, at a single zoom level, so once you try to match the osm
stylesheet it could get just as complicated.

The style files I have made, and the scripts to produce an image from them
are on github:
along with a sample image (image.png)

If anyone knows how to make the datasource specifications more elegant
(hartlepool.mml in my repository) - only define the database parameters once
at the top of the file, for instance, I would be very interested - I am much
more interested in the files being easy to understand and maintain in the
future than being particularly efficient from a processing point of view - I
tend to leave these things for 6 months and have to learn how they work from
scratch again....so easy to understand is important!



Graham Jones
Hartlepool, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110727/141e0d01/attachment.html>

More information about the dev mailing list