<br><br><div class="gmail_quote">On Thu, Jul 28, 2011 at 12:37 PM, Richard Fairhurst <span dir="ltr"><<a href="mailto:richard@systemed.net">richard@systemed.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>
(Incidentally, I missed out from my previous posting one thing that I did<br>
want to say: my one disappointment with all of this is that Maperitive<br>
doesn't use MapCSS or indeed anything of that ilk.)<br>
<br></blockquote><div><br></div><div>Richard, if you remember two years ago I _was_ considering using MapCSS for the (then) Kosmos successor and we had a brief discussion about certain things (see <a href="http://wiki.openstreetmap.org/wiki/Talk:MapCSS">http://wiki.openstreetmap.org/wiki/Talk:MapCSS</a>). Kosmos wiki table rules were becoming cumbersome and I was looking for an alternative.</div>
<div><br></div><div>The basic reason why MapCSS wasn't chosen is because I couldn't see how I could implement an efficient way of rendering maps in real-time using declarative-style rules like CSS or MapCSS, especially in scenarios when the map data is fetched from a database (and I'm talking about a direct OSM schema, not Mapnik's preprocessed one). Maperitive now uses an imperative DSL: you match the feature and then give a sequence of commands for rendering that feature. There are also conditional statements, pattern matching of feature names etc. which allow writing rules without too much duplication. On the other hand I didn't want to employ OSM-specific hacking logic into the rendering engine (which was suggested to me at that time as a possible solution for my problem), I wanted the engine to remain OSM-neutral (except for a few things like multipolygon handling and the layer tag).</div>
<div><br></div><div>As it turns out even that DSL isn't enough for some users, so in the next few months I plan to extend Maperitive with a Python toolkit (instead of implementing a monster general-purpose DSL). The main problem is handling various OSM relation types in a generic way (again, without hard-coded OSM-specific logic. I don't want Maperitive to have an embedded knowledge about cycle routes, for example - I want that knowledge to be expressed externally, by the user. I don't know how that could be achieved using MapCSS (but I haven't followed news on MapCSS, so maybe there is a way now).</div>
<div><br></div><div>Igor</div></div>