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

Frederik Ramm frederik at remote.org
Thu Jul 28 09:13:18 BST 2011


Hi,

On 07/28/11 09:53, Andy Allan wrote:
> No comparison that I'm aware of, but carto certainly has advantages. I
> would say that MapCSS is very primitive when you consider the range of
> symbolizers and attributes that mapnik (and hence cascadenik/carto)
> support compared to any of the engines that use MapCSS. Also MapCSS is
> (somewhat pointlessly) tied up dreadfully into OSM syntax with
> selectors based on not-quite-OSM-primitives like "relation" and "way",

So would it be about right to say that MapCSS is the CSS styling 
language you would want to use when doing, say, an OSM editor or 
something other that is very close to the OSM data model, whereas Carto 
is the CSS styling language you would use to create a "real map"?

I had been under the impression that these worlds were finally 
converging but it seems I was mistaken.

> The suggestion to "fix tilemill to support MapCSS like everyone else
> does" is laughable, really. I would certainly promote convergence in
> the syntaxes, but that's more likely to be by MapCSS tacking towards
> everyone else than the other way around.

I guess that's the kind of skewed view one gets when one deals only with 
OSM software - after all, recent months have seen MapCSS used in all 
major OSM editors, a JavaScript based rendering engine, an Android map 
client...

> But there is a fundamental issue with resolving the two approaches, in
> that in the "mapnik world" they are rendering more-or-less Simple
> Geometries, so you need to pre-process OSM primitives into point,
> lines, polygons. MapCSS takes the (misguided, imho, see my SOTM-EU
> talk) aim to support rendering OSM data directly, so it's full of
> nitty gritty OSM-specific data processing in the syntax. I've no idea
> what would be needed to hook that up to something like pgsql+mapnik.

Well there has been an effort to make Mapnik usable for OSM files 
directly with the OSM data source, but it has turned out that almost 
everyone who says they want to use "OSM files directly" actually wants 
to "create a map like that on www.openstreetmap.org" and with that 
stylesheet relying on osm2pgsql's preprocessing that is just not 
possible, so the OSM data source is practically unused.

Bye
Frederik



More information about the dev mailing list