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

Labels for territories (municipalities, etc...) #4004

Closed
iagocg opened this issue Jan 15, 2020 · 16 comments
Closed

Labels for territories (municipalities, etc...) #4004

iagocg opened this issue Jan 15, 2020 · 16 comments
Labels
Milestone

Comments

@iagocg
Copy link

iagocg commented Jan 15, 2020

Expected behavior

So I would like to address a huge elephant in the room and its that the stantdard OSM map renderer doesn't label territories below admin_level=4. This is quite a problem where I live, as the population is very spread out, so territories are more important than hamlets for understanding where you are.
Territories labels
We have also very defined submunicipality territories (place=civil_parish - admin_level=9) that help understand the map. Municipalities are also very important.
I suggest adding these labels in Noto Serif Italic font, a little bigger than labels for villages and towns, and 50% opacity, and only over a certain zoom level.

Actual behavior

There's no labels for territories below admin_level=4.
Territories no labels

Links and screenshots illustrating the problem

https://www.openstreetmap.org/#map=15/43.3035/-8.5361

@jeisenbe
Copy link
Collaborator

jeisenbe commented Jan 15, 2020

While it's true that only countries and provinces/states get a central text label, all administrative boundaries from admin_level=2 to admin_level=10 have a text label starting at z11 to z16 and higher, depending on level, which is drawn along the inside of the boundary.

We have discussed showing them sooner for admin_level=5 and admin_level=6 features (districts or counties or regions in most countries) and perhaps for =7 and =8 as well (municipalities or similar).

See related discussion in #310 ("Render "admin_level=6" ways at zoom levels 9 and 10"), #3698 ("Consider rendering admin_level=5 administrative boundaries from z9, maybe z8"), #3678 (Very small administrative boundary borders should not be shown) and PR #3677 ("Show administrative boundary text labels from z11 to z16 based on admin_level").

Are the important municipalities in your area tagged as admin_level=8? What initial zoom level is appropriate for them in your area?

Unfortunately we cannot perfectly optimize the rendering for all places, but we try to get a reasonable compromise which works both at high and low lattitudes (which have different scales in the Mercator projection), and rural areas versus cities.

@jeisenbe jeisenbe added the admin label Jan 15, 2020
@iagocg
Copy link
Author

iagocg commented Jan 15, 2020

In Spain I suggest:
admin_level=6 -> z9 Small label // z10 Big label (place=province - provincia)
admin_level=7 -> z10 (place=county - comarca - only if official, not in all autonomous communities)
admin_level=8 -> z11-z12 Small label // z13-z15 Big label (place=municipality - municipio)
admin_level=9 -> z13-z18 (place=civil_parish - parroquia civil).
In Galicia all of these are very significant, and the tiny labels next to the borders don't convey the importance of the territories, which is greater than the tiny hamlets or villages.

@jeisenbe
Copy link
Collaborator

importance of the territories... is greater than the tiny hamlets or villages

The concept of importance is subjective: different map users have different ideas of what is important to them.

Since Openstreetmap is a large community from many different cultures, what we map is based on what can be seen learned by surveying a place in person: https://wiki.openstreetmap.org/wiki/How_We_Map and https://wiki.openstreetmap.org/wiki/Verifiability

The name of a hamlet or village can be confirmed to be true, and the approximate location can be determined, by visiting it in person. In contrast, surveying municipal bondaries and even the boundaries of provinces is often not possible, so this data is usually imported from government sources. Nonetheless we do display these boundaries as lines with labels.

@jeisenbe
Copy link
Collaborator

jeisenbe commented Jan 16, 2020

While displaying a central name label for some admin_level=5 and =6 features, like an Indonesia Kabupaten, an American county or a Provincia de España, may work, it will not work well at higher admin levels.

In particular, the center of a admin_level=8 and higher is rarely significant to general map users. If we tried to display the name of a municipality at it's center, this would be a somewhat arbitrary location which is picked by the rendering software. When the name of the municipality is the same as the name of a place=town or place=city, this can lead to 2 confusing labels with the same name.

For example, "Los Angeles" is a county, a muncipality and a place - but only the place=city node is located near the center of downtown. If we labeled the county or municipality near the geometric center, this would be out in the mountains in the first case, and up in the hills in the second. This problem is common for any town or city that is constrained by mountains or a water body on one side: e.g. A Coruña, Pontevedra, Barcelona, Miami, etc.

I would be interested in seeing a rendering of central name labels for admin_level=5 and admin_level=6 features, and perhaps admin_level=7. This should be checked in several different countries, and in sparsely-populated as well as densely-populated areas. But I already suspect that admin_leve=8 and higher will not be appropriate for that style of rendering.

It might also be possible to further adjust the initial zoom levels when the text labels along the linear borders are shown. In PR #3677 there were already some changes made, but it's possible they could go another zoom level or two earlier, especially the lower admin_level values.

@iagocg
Copy link
Author

iagocg commented Jan 16, 2020

If we tried to display the name of a municipality at it's center, this would be a somewhat arbitrary location which is picked by the rendering software. When the name of the municipality is the same as the name of a place=town or place=city, this can lead to 2 confusing labels with the same name.

Actually I think you make a very good point. Label repetition is no good, yet we could format entities and territories differently, just like with the tiny labels next to the borders: the Noto Serif Italic font at 50% opacity would work wonderfully and could be bigger than the entities labels.

Anyway we could use a node with role=label in boundary relations to put the center text label only when we really think it is necesary, instead of an automatic default for all cases. That way we can also focus where to put the label so that the map doesn't become messy. Is that reasonable?

@jeisenbe
Copy link
Collaborator

jeisenbe commented Jan 16, 2020 via email

@iagocg
Copy link
Author

iagocg commented Jan 16, 2020

And some tag like label=center/empty_space/voronoi? That wouldn't require extra work or tagging for the renderer, yet it would enable an auto-label where the mappers can verify the territory name (signposts, etc...).

@iagocg
Copy link
Author

iagocg commented Jan 16, 2020

Also, place=civil_parish can be interpreted as place=suburb, where the territory emanetes from the node, instead of being enclosed by a boundary.

@kennykb
Copy link

kennykb commented Jan 16, 2020

I'm OK with whatever decision gets made, but thought that I'd comment that it may be different in different parts of the world.

In the US:

admin_level=2 - The nation. Obviously should be labeled at low zoom.
admin_level=3 - Currently unused, may be deployed for 'domestic dependent nations' (such as the Navajo and Hopi reservations, which cross state lines, or even Akwesasne, which crosses the Canadian border) but there's a lot of political controversy surrounding that idea.
admin_level=4 - States (e.g., New York, Texas, Florida) - should be labeled at low/intermediate zoom.

In New York State:

admin_level=5 - New York City is the only level-5 entity in New York: it subsumes five counties. I can't draw a general rule from a unique example.
admin_level=6 - Counties. In New York, these are all named, 'Xxx County' (or 'Borough of Xxx' in New York City) to avoid confusion with like-named cities than may be nowhere near the county. (One example among severeral: there is an admin_level=8 village named Nassau, New York, in a township (admin_level=7) of the same name, located in the Taconic hills, nowhere near admin_level=6 Nassau County, which is on Long Island). At intermediate-high zoom levels, it would certainly be reasonable to render the counties with central labels.
admin_level=7 - Cities and civil townships (called Towns in New York, but there may be no place=town because some townships are entirely rural). Labeling the centers of townships at an appropriate zoom level would make sense, but cities are likely to have place=city nodes that would cause confusion, so I can easily live without this sort of labeling. (It would likely be too expensive to check with a database query whether the region contains a place node, although this would be a way to resolve the question of whether a central label would be confusing.) Another reason that I would shed no tears is the confusion of names unless 'Town of' is included; the Town of Rochester is quite far away from the better-known city of the same name.
admin_level=8 - Villages; and hamlets; and wards, districts, precincts, or community boards within cities. There's no good reason to call these out with central labels; ones that are significant should have place=* nodes.

So here, the right cutoff is probably level 6 (counties are good things to have central labels) or level 7 (central labels on townships would be fine, but ones on cities would be dodgy); level 8 is almost certainly too fine a division for this treatment in a general-purpose map. (It might be useful in a political map, but that's out of scope here.)

@iagocg
Copy link
Author

iagocg commented Jan 16, 2020

Villages; and hamlets; and wards, districts, precincts, or community boards within cities. There's no good reason to call these out with central labels; ones that are significant should have place=* nodes.

Ok, maybe we can achieve a consensus here: place=civil_parish should render similar to place=suburb. But as they are different kinds of places, we shouldn't map the civil parishes as suburbs as that would be "mapping for the renderer".

So I would encourage some developer to code a label for place=civil_parish similar to place=suburb (or even better with the Noto Serif Italic font like in the first screenshot). That way the renderer includes an important tag in spread out high density rural areas.

@kennykb
Copy link

kennykb commented Jan 16, 2020

Ok, maybe we can achieve a consensus here: place=civil_parish should render similar to place=suburb. But as they are different kinds of places, we shouldn't map the civil parishes as suburbs as that would be "mapping for the renderer".

You may think that those words have an obvious meaning, but to me they are confusing.

In the US, the only place where I've seen the word 'parish' used for a civil subdivision is in Louisiana. A 'parish' there is functionally equivalent to a 'county' in most other states; they are major (admin_level=6) civil subdivisions. In most of the US, suburban communities are either annexed by the parent city, or else are municipalities (cities, towns, villages) on their own. I understand that there are other places that have 'suburbs' as some sort of specific governmental unit, but that's uncommon here.

For further complication, a couple of the New England states have counties only as traditional borders or as jurisdictional boundaries for the judicial branch of government, while all executive and legislative functions have devolved upon the townships. In effect, in these places, the next admin_level below 4 (the state) is 7 (the township), although the traditional county boundaries are known to the locals, and in some cases signed.

I don't insist on seeing labels for these. I wouldn't be upset if they got ST_PointOnSurface labels, and equally I wouldn't be upset if they didn't. If I want a political map, I can render it myself.

@ghost
Copy link

ghost commented Jan 23, 2020

I agree with this. All I would do is adapt the font to another one that looks better with the osm carto style!

@jeisenbe
Copy link
Collaborator

jeisenbe commented Feb 6, 2020

@iagocg, @Ivans-Git and @kennykb - would any of you have the time to test a new rendering that would start by adding the central name labels for admin_level=5 and admin_level=6 administrative boundaries?

@jeisenbe
Copy link
Collaborator

See #3678 (comment) - I attempted to implement this, but realized the admin boundaries would need to be entirely reworked, even for admin_level=5 and admin_level=6 central text labels.

We currently only render admin_level=5 and admin_level=6 from z11. At this point, the average sized area admin_level=5 area is already >1400x1400 pixels at the equator, far too large for a central text label to be intelligible. Even a median-sized area will be over 600,000 square pixels at the equator on z11, too big. And admin_level=6 areas are 1/4 the size, both mean and median area, so the average area will still be too large at the equator and median-sized areas at high lattitudes will be too large at z11.

So to implement this idea, we would need to render these admin_levels sooner, as suggested in #3698 and #310 - at z8 or z9 for admin=6level 5 and z9 or z10 for admin_level=6.

This requires re-thinking the line rendering to make it less obtrusive, yet still provide a clear distinction between each admin_level value.

@jeisenbe
Copy link
Collaborator

I think it may be best to start with just admin_level=5 labels. In many places admin_level=6 features have the same name as the main place=town or place=city inside of the administrative boundary, leading to dupicative labels:

Bridgeend, Cardiff and Newbort are all towns/cities, but also admin_level=6 features with the same name. Only "Neath Port Talbot" is not duplicated here:
cardiff-admin-5-6-text-labels

It's possible to filter these out with text-repeat-distance: 200; - but this may not be ideal for mapper feed-back:

cardiff-admin-5-6-text-filtered

I'm also reluctant to render admin_level=6 at z9, as would be ideal when showing the text labels, due to previous comments about the low sigificance of these boundaries in some countries (e.g. Poland), but admin_level=5 does not seem to face this problem, and would make a good first test.

@jeisenbe
Copy link
Collaborator

I've implemented a central text labels for the name= ofadmin_level=5 and admin_level=6 features in #4100, at z8 and z10 respectively. I believe this is as much as we can do, sinc admin_level=7 and =8 features are quite small and too often have the same name as a municipality (town or city or village) which is also mapped as a place=.

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

No branches or pull requests

3 participants