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

Consider rendering admin_level=5 administrative boundaries from z9, maybe z8 #3698

Closed
matkoniecz opened this issue Feb 25, 2019 · 4 comments · Fixed by #4100
Closed

Consider rendering admin_level=5 administrative boundaries from z9, maybe z8 #3698

matkoniecz opened this issue Feb 25, 2019 · 4 comments · Fixed by #4100
Assignees
Labels

Comments

@matkoniecz
Copy link
Contributor

Analysis in #3678 (comment) indicated that typical administrative area with admin_level 5 is much larger than administrative area with admin_level 6 (about 4.8 times larger).

Currently both are rendered from z10.

@alpertron in #310 (comment) claims

I will also need that the admin_level=5 to be rendered also for these zoom levels. This is very important for rendering maps in Argentina.

Note that admin_level=5 areas are present only in some countries - see https://wiki.openstreetmap.org/wiki/Tag%3aboundary=administrative

@kocio-pl kocio-pl added the admin label Feb 25, 2019
@kocio-pl kocio-pl added this to the Bugs and improvements milestone Feb 25, 2019
@jeisenbe jeisenbe self-assigned this Nov 2, 2019
@jeisenbe
Copy link
Collaborator

jeisenbe commented Nov 2, 2019

This comment (#310 (comment)) mentions that the average admin_level=5 is the size of 3.4 tiles at z10. That means that at z9 the average admin_level=5boundary is still larger than 48,000 square pixels, and could have the name rendered along the outside at z9, based on the current limits in admin.mss (though we don't render these before z13 currently). This suggests that z9 or even z8 is not too soon for most admin_level=5 areas to be shown.

@jeisenbe
Copy link
Collaborator

Looking at the median admin_level=5 admin boundary size (#3678 (comment)) - 3,604 square kilometers.

According to #310 (comment)), this equals

2.3 tiles at z10
0.58 tiles at z9 ((38,000 pixes)
0.15 tiles at z8 (9500 square pixels)

In comparison, we render tourism and protected area boundaries >750 square pixels in size and label names on areas >3000 pixels usually. For less significant administrative boundaries it would also be ok to start one zoom level later at approximately 12,000 pixels median or mean size.

@jeisenbe
Copy link
Collaborator

In #3678 (comment) we looked at average-sized admin_level=5 areas.

These are 11,300 km2, which renders as 360x360 standard pixels at 60 degrees on zoom level 8, or almost 130,000 way_pixels. We render the central text label of states up to 196,000 way_pixels only, so this suggests that admin_level=5 would need to be rendered at z8 if we want to consider showing a central text label with the name, as requested in #4004. If only rendered from z9, an mean-sized area would already be >500,000 way_pixels at 60 degrees, so only low-lattiude boundaries would be small enough to show a central label. Certainly z10 is too late.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Apr 2, 2020

I checked other styles. The German-style fork of this style renders admin areas at the same zoom levels, but the French-style at openstreetmap.fr appears to render admin_level=5 (and 6) from z7 at a thin, 0.33 pixel-wide line, till z10. At z11 admin_levels 7,8 and 9 are rendered.

  [admin_level =~ '(5|6)'][zoom >= 7] {
    line-width: 0.33;
    background/line-width: 0.33;

See https://github.com/cquest/osmfr-cartocss/blob/master/admin.mss

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