On Sun, Aug 31, 2008 at 3:17 PM, Andy Allan <[EMAIL PROTECTED]> wrote:
> On Sun, Aug 31, 2008 at 9:12 AM, spaetz <[EMAIL PROTECTED]> wrote:
>
>> And second each added tag makes a) parsing slower b) the stylesheet more 
>> unreadable (for maintainers).
>
> Yeah - from the mapnik side of things we've already had Steve Chiltern
> asking for help. The filter rules become immense quite quickly.
>
> Lets imagine a basic line, that can be on a bridge or in a tunnel - so
> needs three filters
>
> foo = bar and tunnel = yes
> foo = bar and bridge = yes
> foo = bar
>
> but if there's now two ways of tagging the line, and maybe two ways to
> tag a tunnel/bridge, then the rules become unreadable:
>
> (foo = bar or (foo = ben and ben = neb)) and (tunnel = yes or (kol =
> lok and lok = web)))
> (foo = bar or (foo = ben and ben = neb)) and bridge = yes or (blah =
> ack and swe = ob))
> (foo = bar or (foo = ben and ben = neb)


And just putting this for the highway=path example, for footpaths on
the cycle map..

 - we want to primarily render cycle paths
 - we also want footpaths when they're not cycle paths

So a foot path can be:
 highway=footway
 highway=path, foot=yes    (but only when not a bicycle path)
 highway=path, foot=designated

A cycle path is:
 highway=cycleway
 highway=footway, bicycle=yes
 highway=path, bicycle=yes
 highway=path, bicycle=designated

And a track is:
 highway=track
 highway=path, motorcar=yes (possibly... this remains ambiguous to me)

So the rule for a foot path that isn't a cycle path would be:

((highway=footway and not bicycle=yes) or (highway=path and (foot=yes
or foot=designated) and not (bicycle=yes or bicycle=designated) and
not (motorcar=yes or motorcar=designated)) and not bridge=yes and not
tunnel=yes

which makes the styles completely unreadable and unmaintainable which
is part of the reason (along with having other things to do, and not
really agreeing with the need) why it hasn't been added. Also I'm not
even sure we've imported all the columns to postgres to achieve it,
and I haven't even mentioned the issue of z-ordering all of this to
make cycle ways appear over the top of footways and residential roads
etc. To cope with that we need to encode the same logic either into
some SQL or a modified osm2pgsql.

I've been playing with some planet preprocessing to hopefully make
some of this a bit more sane, but it's still not trivial.

Dave

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to