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

River label renders on top of bridge #478

Closed
packi opened this issue Apr 16, 2014 · 13 comments
Closed

River label renders on top of bridge #478

packi opened this issue Apr 16, 2014 · 13 comments
Assignees

Comments

@packi
Copy link

packi commented Apr 16, 2014

Example:
screen shot 2014-04-16 at 1 23 20 pm

Bridge: http://www.openstreetmap.org/way/8147286
Waterway: http://www.openstreetmap.org/way/27600092

@matthijsmelissen
Copy link
Collaborator

How should we solve this? What would be the desired behaviour?

@packi
Copy link
Author

packi commented Apr 21, 2014

Not sure about the how, but I don't think I've ever seen it before (or rather noticed it). In this special case it's a bit awkward because the bridge is very wide (more like a place).

@HolgerJeromin
Copy link
Contributor

Should the waterway be tagged with tunnel? Then it will be same as all other waterways under features.

@matthijsmelissen
Copy link
Collaborator

I'm still not sure what the desired behaviour would be, and if there is actually a problem.

@matkoniecz
Copy link
Contributor

River labels should be displaced to be rendered only over river, not over objects on river.

@matthijsmelissen
Copy link
Collaborator

It is not easy to specify that an object cannot be rendered over another object, as far as I know. The main tool to accomplish that is render order, but I'm not sure how that can help us here. We also don't want half labels if a river is partially covered.

@Rovastar
Copy link
Contributor

This happens in my local area at certain zoom levels
http://www.openstreetmap.org/#map=16/52.9267/-1.4750
but I cannot think of anything sensible to stop this. I think it would be too complex to implement so I would say close this for now.

@daganzdaanda
Copy link

In the case of the screenshot, it might make sense to add a tunnel=yes to the river because it's a big area (would a covered=yes do anything?)
But many bridges get crossed by a river's name, if you look at any city. That's not very elegant, and you can't really add a tunnel in that case.
Up to z14 or 15, I think it's good if a river gets labelled over roads. But at 16+, you see so much detail in a city, and then it looks awkward when a bridge is obscured.

How does displacement work?
It looks as if the river is rendered first, then a bridge on top, then maybe a name of the road, and then the name of the river? I've not seen names of a road and the river colliding -- is there a collision detection going on, or was that just by chance?
ETA: Or is this really a mapnik issue?

@gravitystorm
Copy link
Owner

The way to fix this is to create "labelling features" by taking the water lines/polygons, and 'subtracting' areas that overlap them (and subtracting areas created by adding buffers around linear features like roads). The same approach can be taken to solve e.g. street labels where lots of railway lines passing over the top, e.g. http://www.openstreetmap.org/#map=18/51.49871/-0.11458

But this is all far too complex a solution, given the size of the problem. Perhaps there is an easier way?

@vincentdephily
Copy link

FYI, it happens even for single-way bridges. Just need to be unlucky enough. And it's noticed by users : http://www.openstreetmap.org/note/191799

@matthijsmelissen matthijsmelissen self-assigned this Jul 20, 2014
@matthijsmelissen
Copy link
Collaborator

As we currently have no simple way to solve this, I will close this issue.

@vincentdephily
Copy link

One easy fix would be to render river labels after rivers but before bridges. It's not great as we'd be obscuring the label (maybe even partially), but it's arguably better than the current situation.

There was an inspiring talk about intelligent label placement at SOTM-EU 2014. Can any of it be applied to osm-carto ?

@alfmarcua
Copy link

A partial humble solution to this issue could be to have a phantom label for bridges that displaced river labels. In particular, it could be achieved by giving a label style with opacity 0 to the bridges whenever their own label it is not displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants