[Tagging] Updated cross-renderer/editor support table

Lennard ldp at xs4all.nl
Sun May 16 19:09:05 BST 2010


On 16-5-2010 17:26, Steve Bennett wrote:
> http://wiki.openstreetmap.org/wiki/User:Stevage/tagsupport
[...]
> * Harder than it sounds - almost every source file had changed in a
> way that broke my program.

You still have some (new) issues with the mapnik stylesheet. These might 
take some extra code to detect. For instance, you show

railway=spur-siding-yard

as a tag that's rendered by mapnik. In reality, this is stylesheet 
internal code, built by the SQL query, to collapse railway=rail + 
service=* (recommended tags) and railway=spur, railway=siding, 
railway=spur (TIGER import tags) into a single element for mapnik to 
handle in the rule which renders this element:

SQL:

case when railway in ('spur','siding')
        or (railway='rail' and service in ('spur','siding','yard'))
      then 'spur-siding-yard'::text else railway end as railway

Mapnik:

<Filter>[railway]='siding-spur-yard'</Filter>

Processing the data in this way using SQL is much easier (and more 
readable IMO) than writing filters like this:

<Filter>[railway]='spur' or [railway]='siding' or [railway]='yard' or 
([railway]='rail' and ([service]='spur' or [service]='siding' or 
[service]='yard'))</Filter>

Especially when you take into account there also is a bridge variant to 
handle.

So you might want to be on the lookout for things like this when 
updating your list. Having this internal spur-siding-yard tag in your 
list might give people the wrong idea.

-- 
Lennard




More information about the Tagging mailing list