My goal:

Inspired by Watercolor map created by Stamen Design I'm trying to create custom OSM based map tiles. In the article the Stamen Design guys describe the way of post-processing their tiles (adding Gaussian blur, perlin noise, etc.). I have my own tile server with custom CartoCSS style. I'm pretty happy with it, but I'd also like to add some custom stuff (Gaussian blur etc.) just to a single layer of my CartoCSS style.


Is it possible to post-process layer of CartoCSS (in Tilemill editor) by some external application (e.g. Gimp command line)? What if I want to post-process the layer by some algorithm written in Java/Python/C++? How would I invoke such post-processing for a CartoCSS layer?

Research 1:

I searched through docs of Mapnik and TileMill but so far I didn't find any info regarding to my question:

Research 2:

Mapnik is based on AGG graphics library. From the mapnik sources one can find out how e.g. the lines (ways/paths/...) are rendered. One solution might be to write a custom "symbolizer" (as they call "renderer" in mapnik project). This "symbolizer" could be probably used to render a layer. I'm not sure if this is a correct assumption, but so far this seems to be the right way. I need to do some tests first.


Unless you want to dig around inside Mapnik (I personally wouldn't recommend that, but whatever floats your boat...) I suspect the answer is probably "not easily".

The least-worst solution is probably to have multiple OSM Carto styles, which overlay each other, but with one partly transparent so that it can overlay the other. Apply whatever graphical jiggerypokery you want to the whole of each tile in one of the layers, once a new tile in that layer is rendered. "renderd" can write debug info when it's finished rendering a tile to syslog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.