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

Labeling priority #3278

Closed
niquepolice opened this issue Jun 25, 2018 · 3 comments
Closed

Labeling priority #3278

niquepolice opened this issue Jun 25, 2018 · 3 comments

Comments

@niquepolice
Copy link

niquepolice commented Jun 25, 2018

On the screenshot taken at zoom level 8 you can see Нижний Новгород(Nizhniy Novgorod) and Дзержинск(Dzerzhinsk) cities, but on the level 7 Nizhiny Novgorod disappears, though Dzerzhinsk, which is in fact several times smaller city, remains on the map. Is there any reason for that?

Links and screenshots illustrating the problem

https://www.openstreetmap.org/#map=8/56.263/43.863
image

https://www.openstreetmap.org/#map=7/56.263/43.863
image

@sommerluk
Copy link
Collaborator

sommerluk commented Jun 25, 2018

Is there any reason for that?

Yes. On z7, the label for Нижний Новгород (Nizhniy Novgorod) is hidden by the label for Нижегородская область (Nizhny Novgorod Oblast). The former is a place=city, which represents big cities. The latter is a boundary relation with admin_level=4, which represents federal states. In case of conflict (both labels cannot be rendered at the determined position because they would overlap), the boundary relations wins against the city, because we consider the boundary relation label more important.

(The perfect solution might be to shift slightly the label for the boundary relation, but that’s technically not so easy…)

@kocio-pl kocio-pl added the text label Jun 25, 2018
@kocio-pl kocio-pl added this to the Bugs and improvements milestone Jun 25, 2018
@niquepolice
Copy link
Author

Thank you for your reply. I guess that label shifting is not a big algorithmic problem nowadays but unfortunately I'm not familiar enough with Carto's rendering process to understand technical difficulties.

As for relative importance of federal state labels and big city labels, maybe ideally it should depends on the country, for example, on Google maps there no federal state labels in Russia and Kazakhstan by default, while in China and the US federal state labels have higher priority than cities.

@sommerluk
Copy link
Collaborator

In general, we try to use the same algorithm all over the world to create a consistent feeling of this rendering style, so likely we won’t treat Russia different from China.

In #1391 some there is yet some discussions about using “grid” placement to solve this problem. Therefor, I’ll close this issue as duplicate. Thanks for your report! Discussion can be continues in #1391

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

No branches or pull requests

3 participants