Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2763 closed defect (fixed)

railway+bridge+service -> bridge will not render in Mapnik

Reported by: EvanE Owned by: mapnik-team@…
Priority: major Milestone:
Component: mapnik Version:
Keywords: railway, bridge, service Cc:

Description

When using railway=rail and bridge=yes (+layer=1) and service=siding (+lanes=1) then the bridge will not be rendered by Mapnik. It used to be rendered as a printout from nov. 25 2009 shows.

Example: railway station Bonn-Bad-Godesberg (Germany), south-end

Look for way 43.043.279.

If you continue the rails to the north-end you'll find bridge 43.357.466. There I have changed lanes=1 to tracks=1, in case that lanes=* is the problem.

Note: On the other parts of this station someone removed service=siding and lanes=1 in an attempt to have this area rendered as it should be rendered.

Edbert (EvanE)

Change History (7)

comment:1 Changed 9 years ago by Fips

If you have "service=spur", this bug happens, too.

See http://trac.openstreetmap.org/ticket/2767

comment:2 Changed 9 years ago by ldp

Resolution: fixed
Status: newclosed

(In [20253]) Add bridges to railway=rail + service=spur/siding/yard. Fixes #2763, #2767

comment:3 Changed 9 years ago by EvanE

Resolution: fixed
Status: closedreopened

The rule you added helps with railway=spur|siding|yard which is not the recommended way to tag, though it is common through the TIGER-import.

Our problem is with railway=rail|light_rail|narrow_gauge|tram|subway|monorail|funicular|preserved|disused|abandoned plus service=siding|spur|yard plus bridge=yes|viaduct|swing|draw|...

Thus we need another filter with

<Filter>[railway] = 'rail-light_rail-narrow_gauge-tram-subway-monorail-funicular-preserved-disused-abandoned' and [service] = 'spur-siding-yard' and [bridge] = 'yes-viaduct-swing-draw'</Filter>

It might be necessary to slpit this filter further when it is wanted to draw some of railway, service or bridge in a different styles.

Edbert (EvanE)

comment:4 Changed 9 years ago by Ldp

You have misunderstood the patch. It *will* work for railway=rail + service=spur/siding/yard too.

The filter you wrote will never work. There are no railway=<long string you wrote> values in OSM. :-)

comment:5 Changed 9 years ago by Ldp

Resolution: fixed
Status: reopenedclosed

As you can see, it now renders: http://www.openstreetmap.org/?way=43357466

comment:6 in reply to:  4 Changed 9 years ago by EvanE

Replying to Ldp:

You have misunderstood the patch. It *will* work for railway=rail + service=spur/siding/yard too.

The filter you wrote will never work. There are no railway=<long string you wrote> values in OSM. :-)

Well, looking at your patch:

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

It seems obvious that this filter matches railway=siding/yard/spur but it is in no way obvious, that this filter matches the case of railway=rail + service=siding. So please excuse my misunderstandig.

However you have done it, rendering now works as wanted.

So thanks for the fast solution.

comment:7 Changed 9 years ago by Ldp

Really, don't read anything special into 'spur-siding-yard'. The '-' characters are not any magic mapnik language construct, and this filter will quite literally match any literal 'spur-siding-yard' field in the SQL results.

However, scroll down to the <Layer>, and see what preprocessing I do with SQL to understand why my patch does work.

Note: See TracTickets for help on using tickets.