OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
17 stars 1 forks source link

Color-code countries at low zoom levels #700

Open 1ec5 opened 4 months ago

1ec5 commented 4 months ago

In OSM World Discord, a mapper suggested shading each administrative area in a different color from its neighbors, as one typically finds on a political map or general-purpose map that isn’t heavily transportation-centric. A choropleth would be useful because the user won’t necessarily be familiar enough with the historic boundaries in a given area to orient themselves like they would using present-day boundaries.

The good news is that the vector tiles already represent boundaries as polygons. The bad news is that the polygons contribute to performance issues and probably need to be eliminated at some zoom levels: #701. But at high zoom levels where we only show countries, we can probably still get away with simplified boundary polygons.

The bad news is that we’ll have to determine the color that each country should be filled with. For a map that depicts a single point in time, the four color theorem guarantees that no two adjacent areas share the same color. We probably have access to tools to calculate the four-color-theorem colors when generating the tiles. However, our tiles use a single feature to represent a boundary over time. Even if a boundary doesn’t change, its neighbors can change. I’m not sure that the four color theorem is proven for the more general case.

vknoppkewetzel commented 4 months ago

I personally do not think we should implement a 4 color country fill at low zooms (or low-zoom) in the current "main" style, although I can see that being useful as a separate style

The case to not do it

I do not think the 4 color theorem would specifically help a user identify different countries at low zooms - if that is the goal, I think there are other ways to support a user identifying and differenting countries at low-zooms.

At low zooms (on an unknown screen size (map extent available), with dynamic styling rather than highly customized styling*), I have trouble seeing how the 4 color theorem would be more helpful than country borders image

In the "super low" zoom above, I see country borders and can differentiate them. I mostly at this low zoom can't differentiate some countries in terms of "what they are"since not all labels show up (a product of standard dynamic zoom level styling to help with legibility and not having too many things stack, as we know of course).

zoom in to z5, still low zoom: image image

In an interactive map, we always have the labeling coming in and out as some countries are biggers than others as noted above, but I still see country boundaries differentiating here.

I think if it is a priority to differentaite even further for a user to immediately identify countries at low zooms we can:

IMO, doing a 4 color country coloration wouldn't remove the issue of people knowing what country specifically is at lower zooms, largely due to the fact that color or existing boundary will show polygons, but they still won't see all the labels at once at low zooms.

If we do it

If we do a four color map to differentiate country polygons, I agree, finding the right colors matters, but I also think only doing them at low zooms wouldn't make sense for a user. If I want to differentiate countries at z5 and am "used to" doing so as a means to determine different countries...: image

... I will also want it at z9/mid level zooms where I still see country borders. And design-wise, it is better to have the cognitive reinforcement of an aid across zoom levels. I think it would be okay to fade out at high zooms. z9/mid level zoom: image

It would be disorienting if it is an aid, to stop it after low zooms and not have it in mid-zooms.

In order to ensure users don't feel disoriented / don't use a visual cognitive aid at mid-level zooms, it would mean doing a bit of redesign across the map , across many data layers that would be affected.

If that seems like the path forward, I think that can be done, we just would be moving away from this main design.

Alternatively, this could be an intentional separate style that is more "reference map focused", maybe a good use of a "political map style" maybe? Then we don't need to be considering all-the-data like in main, but rather, just relevant poltiical info - boundaries, place labels, plus major natural features (ex: mountains/bigger rivers) ex: image

1ec5 commented 4 months ago

I agree that a separate political map style would have more room to use fill colors for this purpose. I assume the main benefit would be not so much to identify countries by their shapes, but rather to associate the parts of a country – think possessions and that sort of thing. Or to take a more local example, most painted playground maps color the Upper and Lower peninsulas of Michigan in the same color. Proponents of D.C. statehood would be miffed to learn that the U.P. beat them to statehood. 😄

Anyhow, I’m not even sure this idea is mathematically feasible.

Bauer33333 commented 4 months ago

The bad news is that we’ll have to determine the color that each country should be filled with. For a map that depicts a single point in time, the four color theorem guarantees that no two adjacent areas share the same color. We probably have access to tools to calculate the four-color-theorem colors when generating the tiles.

The four color theorem does not apply to countries with exclaves, and those are the ones where I see how coloring could come handy. Especially on areas/times like the Holy Roman Empire of German Nation, but there even humans creating a map run into issues assigning the colors.

If there is a separate political map style it could switch between admin levels when zooming, so you get states and municipalities as well.

vknoppkewetzel commented 4 months ago

Or to take a more local example, most painted playground maps color the Upper and Lower peninsulas of Michigan in the same color. Proponents of D.C. statehood would be miffed to learn that the U.P. beat them to statehood. 😄'

I am from WI -I am confused. they should be the same color! I do know many people forget that UP is part of Michigan though haah. I attribute it to people not paying attention to the midwest :(

I like correcting people with the Michigan mitten visual and reminding them that Michigan is actually like one mitten and then the other mitten has to be a flat hand like "rock paper scissors' - paper hand gesture. "mitten + paper" haha.

RIP DC statehood 😢 someday we will get it.... 🤞

vknoppkewetzel commented 4 months ago

If there is a separate political map style it could switch between admin levels when zooming, so you get states and municipalities as well.

a great idea!

jeffreyameyer commented 4 months ago

Not sure if these are helpful, but here are some examples from the OSM ecosystem of colorized countries:

In the past, TileMill had a geography class set of styles that created some nice effects: https://blog.mapbox.com/learn-cartocss-and-compositing-by-customizing-geography-class-671af2c6550b image

Much more recently, these guys have a very cool demo... https://maplibre.org/

Monosnap MapLibre | MapLibre 2024-02-29 10-48-45