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

Igor Brejc igor.brejc at gmail.com
Fri Jul 29 17:57:56 BST 2011


On Fri, Jul 29, 2011 at 11:56 AM, Richard Fairhurst <richard at systemed.net>wrote:

>
> Perhaps one day Maperitive might parse MapCSS
> styles optionally, just as JOSM allows you to choose between MapCSS and its
> own MapPaint styles?


Once I (hopefully) extend Maperitive with Python bindings,  I see no
obstacles for someone (maybe even me) writing a MapCSS parser in Python and
using those bindings to render the maps appropriately.


> You are of course right that declarative CSS-type rules will be slower to
> parse (though web browsers seem to manage it fairly quickly ;) ). But
> computers get faster, and for some people simplicity and universality are
> an
> adequate trade-off for speed.


I see no problem with MapCSS when you have all of the geo data pre-loaded
into memory. But I do see a problem if you have a planet-size PostGIS
database, for one simple reason - workflow:

   - In MapCSS I would have to go through the list of all geo elements and
   apply any matching MapCSS styling rules to produce a graphic element.
   - Maperitive goes through the list of all rules and finds any matching
   geo elements (using rule selectors) for each rule. Then for each matching
   geo element a series of commands is executed which produce one or
   more graphic elements.

 In a large database going through the list of all geo elements (even if
bound-boxed) would be prohibitively expensive. It's true that computers get
faster, but the planet.osm gets bigger, too :)

Given that my doubtless-inefficient rules
> engine works tolerably quickly on Adobe's dog-slow Flash Player for Mac, I
> suspect one done by a proper programmer in a proper environment could be
> "fast enough" for many people.
>

I agree... Back then I was hoping to create a system that would be easy to
use/write but still powerful enough for DB-based rendering with all OSM
idiosyncrasies. Now that I've abandoned those foolish dreams, my hope is to
provide something for different kinds of users.

Igor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110729/ea49f0f4/attachment.html>


More information about the dev mailing list