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

Stop label rendering for too big areas #3764

Merged
merged 1 commit into from
Apr 29, 2019

Conversation

sommerluk
Copy link
Collaborator

@sommerluk sommerluk commented Apr 24, 2019

Fixes #1028

For various areas, we start label rendering not at a fixed zoom level, but based on the area of the feature. Bigger features get rendered yet on earlier zoom levels.

Furthermore, the size of the label usually gets bigger when the zoom level raises and so the feature occupies more space on the screen.

Since a while, we want to stop label rendering for very big areas that cover the hole screen because the label is quite useless at this scale. However this was not possible in the past because of a bug in our software stack. The bug has been fixed, so now we can do this. (See #1028)

Changes proposed in this pull request:

  • Stop label rendering for too big landcover areas.
  • Unify the thresholds of islands/islets with the other landcover features: 750, 3000, 12000, 48000, 192000, 768000 (always factor 4 between the steps). [Bridge thresholds follow a different logic and still have their own threshold set.

Test rendering with links to the example places:

(Left: After / Right: Before)
w1
w2
w3
w5

@sommerluk sommerluk merged commit 70ebd2a into gravitystorm:master Apr 29, 2019
@sommerluk sommerluk deleted the waypixel01 branch August 5, 2019 06:04
jeisenbe added a commit to jeisenbe/openstreetmap-carto that referenced this pull request Sep 8, 2019
Prior to gravitystorm#3764 most features in `landcover` had text labels rendered at high zoom level when tagged on nodes.
This PR restores this rendering by adding a check for way_pixels=null.
Suprisingly, way_pixels != null has to be checked or else the points render with the large lancover text size
jeisenbe added a commit that referenced this pull request Sep 20, 2019
* Restore rendering of landcover and island text labels on points
* Select way_pixels as 0 if way_area is null

Prior to #3764 most features in `landcover` had text labels rendered at high zoom level when tagged on nodes, the same as very small areas. This PR restores this rendering by setting way_pixels to 0 if way_area is null, so points are treated the same as tiny polygons. Fixes #3876
and #3868 and related bugs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop landuse labels based on area
3 participants