gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 817 forks source link

zoom level 4 in N america #3523

Closed brandoncote closed 2 years ago

brandoncote commented 5 years ago

US state names, or at least acronyms, would be much appreciated

a big, mostly empty, land mass (almost everything north of mexico is empty)

https://www.openstreetmap.org/#map=4/45.59/-93.65

kocio-pl commented 5 years ago

Hi,

Currently we're using the settings summarized in this file:

https://github.com/gravitystorm/openstreetmap-carto/blob/master/USECASES.md

matkoniecz commented 5 years ago

Do you consider "empty, land mass" as problem by itself and want to fill it? Or is there some purposes for showing this data earlier?

Adamant36 commented 5 years ago

It says in the usecases.md that both city and names render at z5, z6, z7. Whereas in the example the person provided they are both showing up at z4. I think the issue is that if only a few of of them are going to be rendered at z4, it would be better to show all of them. So it doesn't give the false impression of emptiness.

(btw, I might be wrong it could just be city names, since I know nothing about Canadian places, but either way its inconsistent to show a city like Phoenix at z4 when the state of Arizona doesn't show up until z5. Or why doesn't a place like Houston show up at z4 also when its the 4th most populous place and Phoenix is 14th. Especially considering neither one of them are suppose to render at z4 according to the usecases.md file.)

manfredbrandl commented 5 years ago

I see that cities dont get the priority from their number of inhabitant, but from room for their name at their location on z4: 3bc85b40-3989-4c0c-9fcb-f5cb7394a5e7 Berlin, Vienna and Warsaw have more inhabitants than Munich.

jeisenbe commented 5 years ago

The country labels are rendered first, and then the names of cities only appear if there is enough space.

Berlin is probably colliding with the last 4 letters in “Deutschland”, Warsaw is at the same location as the label for Polska, etc.

kocio-pl commented 5 years ago

There are some obvious things like labels priority, but this all is more complex - this is the code that count categories and score:

https://github.com/gravitystorm/openstreetmap-carto/blob/6684f0aeba571c01fb774530f3acc8f90b6aaaff/project.mml#L1332-L1375

and then placenames are rendered according to that:

https://github.com/gravitystorm/openstreetmap-carto/blob/master/placenames.mss

jeisenbe commented 5 years ago

We could try rendering the 2-letter ref code for boundary=administrative + admin_level=2 features, but there are 774 states and provinces with a ref world-wide. While this would work at z4 for Canadian provinces and larger States in the USA, there might be problems in some countries.

Perhaps filtering for >1000 way_pixels will avoid rendering the ref for too small of provinces, but this will leave off only some labels in countries that have varying-sized provinces, as happens with the name labels currently.

Anyone want to give it a try?

pnorman commented 5 years ago

We're going to end up omitting labels regardless, the only way to get all the US states labeled is with lines.

brandoncote commented 5 years ago

The point isn't to try to put all state labels on it; it's to make use of the empty spaces.

pnorman commented 2 years ago

Duplicate of #2280