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

Label for larger bodies of water in Slippy standard view #700

Closed
David-Duffy opened this issue Jul 4, 2014 · 7 comments · Fixed by #816
Closed

Label for larger bodies of water in Slippy standard view #700

David-Duffy opened this issue Jul 4, 2014 · 7 comments · Fixed by #816
Assignees
Labels

Comments

@David-Duffy
Copy link

As per the discussion on:

https://help.openstreetmap.org/questions/34585/names-of-large-lakes-not-appearing-at-any-zoom-level?page=1&focusedAnswerId=34591#34591

Reading a map, I use (major) lake names to work out where I am, as well being interested in what body of water I am looking at.

Is it possible to either
a) show lake labels in the standard view at, say, z10 (as used in humanitarian view)
or
b) show a label if the polygon area is above a threshold - either absolute area, or proportion of current view, where the label would appear centred in the visible water.

@Rovastar
Copy link
Contributor

Rovastar commented Jul 4, 2014

Yeah that is possible and sensible. I would be against a) though as small "lakes" tagged might be rendered.
b) is possible but more of an issue.

@David-Duffy
Copy link
Author

FWIW, labels for islands in the lake appear at zoom >= 12, but for the lake itself at zoom >= 15

@matkoniecz
Copy link
Contributor

According to

[zoom >= 15] {
labels on natural=water will be rendered from zoom level 15 using this style. Humanitarian layer is smarter and labels may be rendered from z10, depending on area - see https://github.com/hotosm/HDM-CartoCSS/blob/c101c2c20777e9653001fc4a5c60adaaed57773a/labels.mss#L416

Note that Humanitarian layer is NOT released under open license so it is necessary to either wait for hotosm/HDM-CartoCSS#237 (and hope that they will not only decide to use open license but that they will also release it under something compatible) or redo this work.

@pnorman
Copy link
Collaborator

pnorman commented Jul 4, 2014

The license isn't really an issue, as we'd have to rewrite any logic, and the logic they do have is pretty trivial. I'd also probably do area filtering a different way anyways.

@matkoniecz
Copy link
Contributor

@imagico
Copy link
Collaborator

imagico commented Jul 4, 2014

Glacier labels already use limits based on area, see https://github.com/gravitystorm/openstreetmap-carto/blob/master/water.mss#L55 - although these rules could well be extended to lower zoom levels and larger areas.

In general variable zoom limits based on way_area would also make a lot of sense elsewhere - like for the islands as well demonstrated by the french style (https://github.com/cquest/osmfr-cartocss/blob/master/placenames.mss#L55)

@daganzdaanda
Copy link

+1 for names on big lakes appearing earlier. On really large lakes, z=8 or even 7 would be OK.

In general variable zoom limits based on way_area would also make a lot of sense elsewhere

Yes, pretty much everything could profit from size-aware rendering. And someone (pnorman?) said, it's actually not affecting rendering performance much at all. So let's use way_area a lot!

Another thing about lakes: The big lakes themselves should also appear earlier, and smaller stuff later.
At the moment, all natural=lake|water; landuse=reservoir|water and waterway=riverbank appear at zoom >= 6. Rendering the small stuff later would fix #73 and look better IMHO. And on the other end there are huge lakes that could be rendered at zoom=3 already. Maybe having 3 groups would be best: huge - large - and the rest

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

Successfully merging a pull request may close this issue.

7 participants