Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Water areas with tunnel=yes should not render above landcover #3312

Open
Marc-marc-marc opened this issue Jul 21, 2018 · 12 comments
Open

Water areas with tunnel=yes should not render above landcover #3312

Marc-marc-marc opened this issue Jul 21, 2018 · 12 comments

Comments

@Marc-marc-marc
Copy link

Marc-marc-marc commented Jul 21, 2018

layer 1 :
a parking https://www.openstreetmap.org/way/601761935
amenity | parking
layer=1
parking=surface
a road https://www.openstreetmap.org/way/601761936
highway | service

layer=-1
a river https://www.openstreetmap.org/way/601763495
layer=-1
tunnel=yes
waterway=river
the riverbank of this part of the river https://www.openstreetmap.org/way/100709132
layer=-1
tunnel=yes
waterway=riverbank

Expected behavior

show the parking area like all surface parking.
if the tunnel is also rendered, it must be very light and not "overwrite" the render of the parking.

Actual behavior

the riverbank (layer=-1) is render on top of the parking (layer=1) in stead of under it

Links and screenshots illustrating the problem

https://www.openstreetmap.org/way/100709132
screenshot_2018-07-23 linia 100709132 openstreetmap

@kocio-pl
Copy link
Collaborator

It might be solved by #2875 and then removing rendering of underground parkings, see #552 (comment).

@kocio-pl kocio-pl added the bug label Jul 23, 2018
@kocio-pl kocio-pl added this to the Bugs and improvements milestone Jul 23, 2018
@Marc-marc-marc
Copy link
Author

this location doesn't have any underground parking.
the parking is at the ground level (a classic parking=surface), the river is in a tunnel under the parking.

@kocio-pl
Copy link
Collaborator

Sorry, now I understand. I don't have the idea what to do, does anybody else have some?

BTW: I think this parking should be tagged as layer=0 (or just omit the layer tag).

@kocio-pl
Copy link
Collaborator

Maybe we should hide riverbanks when tagged as underground, like #3162?

And maybe the same should be done for natural=water and landuse=reservoir. The common code is here:

[natural = 'water']::natural,
[landuse = 'reservoir']::landuse,
[waterway = 'riverbank']::waterway {
[zoom >= 0][zoom < 1][way_pixels >= 4],
[zoom >= 1][zoom < 2][way_pixels >= 16],
[zoom >= 2][zoom < 8][way_pixels >= 32],
[zoom >= 8] {
[int_intermittent = 'no'] {
polygon-fill: @water-color;
[way_pixels >= 4] {
polygon-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-gamma: 0.6;
}
}
[int_intermittent = 'yes'] {
polygon-pattern-file: url('symbols/intermittent_water.png');
[way_pixels >= 4] {
polygon-pattern-gamma: 0.75;
}
[way_pixels >= 64] {
polygon-pattern-gamma: 0.6;
}
}
}
}
}

@kocio-pl
Copy link
Collaborator

The code for showing tunneled waterways is here - I think areas should be just hidden, but one can use the same code for filtering them:

.water-lines {
[waterway = 'canal'][zoom >= 12],
[waterway = 'river'][zoom >= 12],
[waterway = 'wadi'][zoom >= 13] {
// the additional line of land color is used to provide a background for dashed casings
[int_tunnel = 'yes'] {
background/line-color: @land-color;
background/line-width: 2;
background/line-cap: round;
background/line-join: round;
}
[bridge = 'yes'] {
[zoom >= 14] {
bridgecasing/line-color: black;
bridgecasing/line-join: round;
bridgecasing/line-width: 6;
[zoom >= 15] { bridgecasing/line-width: 7; }
[zoom >= 17] { bridgecasing/line-width: 11; }
[zoom >= 18] { bridgecasing/line-width: 13; }
}
}
water/line-color: @water-color;
water/line-width: 2;
water/line-cap: round;
water/line-join: round;
[int_intermittent = 'yes'],
[waterway = 'wadi'] {
[bridge = 'yes'][zoom >= 14] {
bridgefill/line-color: white;
bridgefill/line-join: round;
bridgefill/line-width: 4;
[zoom >= 15] { bridgefill/line-width: 5; }
[zoom >= 17] { bridgefill/line-width: 9; }
[zoom >= 18] { bridgefill/line-width: 11; }
}
water/line-dasharray: 4,3;
water/line-cap: butt;
water/line-join: round;
water/line-clip: false;
}

@jaffroy62
Copy link

jaffroy62 commented Aug 28, 2018

This could be a similar symptom, if the bridge is removed the riverbank is rendered on top of the parking area.

Expected would be the that the amenity=parking area is painted on top of the bridge.

Assumption: could it be that the layer tag of the parking area is not interpreted correctly?

https://www.openstreetmap.org/#map=19/48.52899/9.06783

bildschirmfoto 2018-08-28 um 09 01 06

Layers in this case:

bridge: layer=1
riverbank: layer=0 (standard)
parking area: layer=1

@kocio-pl
Copy link
Collaborator

Wild guess: probably this is because layer tag is not global in this style, it works only in the internal "data layer" (for example it within roads, but parking is in amenity layer).

@jaffroy62
Copy link

jaffroy62 commented Jun 17, 2019

I observed another unclear appearance: Here a bridge goes over a residental highway. In my opinion the residental in this example should be painted with shaded appearance.

image

https://www.openstreetmap.org/#map=19/48.53115/9.03813

btw. the parking area underneath the bridge is rendered correctly :-)

@matkoniecz
Copy link
Contributor

Here a bridge goes over a residental highway

See #1799 for more discussion about road/bridge layering.

@HolgerJeromin
Copy link
Contributor

In my opinion the residental in this example should be painted with shaded appearance

Just add covered=yes and you have what you want (and did not lie for the renderer).

@jeisenbe jeisenbe changed the title surface parking over a river/riverbank/tunnel Render water areas with tunnel=yes below landcover Sep 5, 2019
@jeisenbe jeisenbe changed the title Render water areas with tunnel=yes below landcover Render water areas with tunnel=yes should not render above landcover Sep 5, 2019
@jeisenbe
Copy link
Collaborator

jeisenbe commented Sep 5, 2019

We could try not rendering water areas, including waterway=riverbank and natural=water, when tagged with tunnel=yes. The waterway line should still show as a tunnel.

@jaffroy62
Copy link

Does this mean that the bridge problems presented in my above posts have to be moved to an seperate issue?

@jeisenbe jeisenbe changed the title Render water areas with tunnel=yes should not render above landcover Water areas with tunnel=yes should not render above landcover Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants