[OSM-talk] simplifying mapnik layout definition

Andy Allan gravitystorm at gmail.com
Tue May 27 16:25:10 BST 2008


On 5/27/08, Tom Hughes <tom at compton.nu> wrote:
> In message <20080527144058.GP2178 at mails.so.argh.org>
>
>         Andreas Barth <aba at not.so.argh.org> wrote:
>
>
> > The differences are only within the scales. So it would make sense to
>  > split the scales off - and make them as small as possible. The smaller
>  > it is, the easier one can make changes. So this could be written as:
>  >
>  > <Style name="tunnels-casing">
>  >       <Rules filter="([highway] = 'motorway' or [highway]='motorway_link') and ([tunnel] = 'yes' or [tunnel] ='true')"/>
>  >       <CssParameter name="stroke">#506077</CssParameter>
>  >       <CssParameter name="stroke-dasharray">4,2</CssParameter>
>  >       <ScaleDenominator max="200000" min="100000">
>  >         <CssParameter name="stroke-width">3</CssParameter>
>  >       </ScaleDenominator>
>  >       <ScaleDenominator max="100000" min="20000">
>  >         <CssParameter name="stroke-width">5.5</CssParameter>
>  >       </ScaleDenominator>
>  >     </Rules>
>  >
>  >
>  > This drops the (IMHO unnecessary) LineSymbolizer (one can make it up
>  > from the stuff around it) and emphasizes the differences. If this looks
>  > ok-ish, I could write an converter from the new to the old format as an
>  > starter.
>
>
> That doesn't look valid to me though, as you aren't telling it
>  what symbolizer to use to draw the object. Have you actually checked
>  that mapnik accepts that syntax and does the right thing?

Of course this doesn't work, it's not actually how mapnik works. It's
pie in the sky stuff.

Now, if someone is volunteering to make a concise definition format
that can be pre-processed into the mapnik XML format (or mapnik python
code, or even just read by a modified mapnik directly, or whatever)
then I'd absolutely love to SEE THE WORKING CODE. That osm.xml is an
unwieldy beast isn't in question, nor are the myriad of possibilities
to improve it - what is lacking is working alternative.

Cheers,
Andy




More information about the talk mailing list