-
Notifications
You must be signed in to change notification settings - Fork 819
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
Simplify low-zoom landcover rendering to 4 main colors (requires 3 water colors) #3670
base: master
Are you sure you want to change the base?
Conversation
Luxembourg z11 |
Good question! I checked the data, and it appears that the whole forest is divided up into small rectangular parcels about 300 x 1000m, or 400 x 400m in size, which share the same nodes at their borders, so it should render as one large area of forest. I'm not sure if these divisions represent land ownership parcels or if they are simply how the mappers in this area created the forest areas in small chunks: The borders between these parcels should not be visible, and I don't know why they are appearing at this zoom level only. There should be no change in the rendering with this PR; the polygon-gamma is the same before and after.
This issue also reminds us of the perils of filtering by way_pixels. Right now, some of the smaller forest parcels (300 x 200m) will no longer be rendered at z8, where they will be 0.8 pixels in size. If the limit was changed to 0.01 pixels, as on the alternative-colors branch, then an area of this size would continue to render until z5 at this latitude. |
Hhhmmm, that's really weird. I'll have to see if I can find it happening anywhere else. I don't think I've seen it before, but its really hard to spot. So maybe I just missed it. Thanks for looking into it. I totally didn't think about checking it with Data Inspector. |
I've confirmed that the same artifacts are seen in the rendering from the master branch, and from the current branch with fading removed (which shows the lines more clearly): Current rendering (Exported from Kosmtik) z10 Master branch, with fading removed z10 And here's a link to the same location on the live map for comparison: |
I have big general question (which I asked in the ticket issue probably): why clustering them, while the only problem for me seems to be dark forest/woods? There can be large areas of other things, so it's always good to recognize them. For me only making forest color lighter (maybe only on lower zoom levels) might be enough, but maybe also much less fading. |
While this would certainly reduce the bias and the bad mapping incentive you have now (favoring big polygon mapping over small grained mapping) it would not create results similar to my low zoom demo. This uses a completely different rendering approach for the landcover layers. There are other design differences as well - in particular in roads rendering, various color differences and in not using any polygon pattern fills at low zoom levels (unification of base color is kind of pointless if you keep rendering a differentiated pattern above it). |
Right, my understanding that the low-zoom demo isn't the same as the alternative-colors style, which uses Mapnik, correct? (The pixel limit is only different in the landcover layer (z10 and up), not in the landcover-low-zoom layer, where it is already at 0.01 pixel in this style)
I think this is a good idea, but I was trying to limit this PR to changing the base colors, since it is already a very large PR to review. However, I could include these changes in this PR if the maintainers can reach a consensus to remove the sand and bare_rock patterns below z10 or z12. (I'm not sure if the wetland pattern is also considered a problem at low zoom levels; it looks like you have the pattern rendering at z9 for mud in the alternative-colors style)
It's still useful for sub-pixel areas where the color mixing would otherwise be more confusing, though I agree that the pattern could be counterproductive. |
Correct, the low zoom demo is an alternative low zoom continuation of the style.
Yes, this is just completely inconsistent here now - and the database indices are also not adjusted to the queries. In terms of the results it does not really matter because the landcover rendering is purely decorative at these scales at the moment anyway. But if you change that as you do in this PR it will start to matter again.
Starts at z10 for all wetlands: https://github.com/imagico/osm-carto-alternative-colors/blob/master/landcover.mss#L799 |
I should also mention that the low zoom color scheme used was designed for use with the three color scheme for water, in particular for the darker color for rivers. It would therefore likely not work equally well with the single water color here. |
Are there any places in the test renderings where useful information was lost? We currently unify all of the developed landuses into one gray, built-up color at z12 and lower, because we've recognized that it would be difficult to see the different areas at lower zoom levels, and because small areas would lead to mixed colors when they overlap in one pixel. This same problem happens with the different vegetation colors and bare ground colors at low zoom. For example, if an area of It's true that the dark forest color causes difficulty reading some linear features, but this isn't the only issue with using the same colors at high zoom. And - as I mentioned in #3513 (comment) - we cannot use So if we use If we've unified half of the types of landcover, it makes sense to simplify the others as well. |
I haven't yet studied how these work. Would you have time to open an issue explaining the problem? |
Background info on the technical and cartographic aspects of way_area filtering can be found in: When using a size threshold of 0.01 times the pixel size at z9 and 1 times the pixel size at z10 that is of course not something you can reasonably work with in terms of indices. |
I don't think this helps with #3647. It decreases the contrast on some very important features. |
Good points. The current high-zoom forest color is also rather close in lightness to the current water and river color, so this is also an issue with the current rendering, but it's more obvious at low zoom, where rivers are likely to be narrow. I believe the main issue is that @imagico has suggested using a darker color for rivers: Christoph has discussed this extensively on his blog and is in favor of showing the difference to improve the quality of water data. If the rendering is different, mappers will be more likely to remember to add "water=river" to the "natural=water" tag on river polygons. I was thinking that this could be discussed again in another PR, perhaps also related to switching the ocean color, but for this change it would be sufficient to darken the river color to I searched for PRs and Issues about "river" "water" and "color", but I don't see any previous PR or detailed discussion of changing to 2 or 3 different colors for water? Was anyone opposed to this change in the past? |
While the contrast between forest and (gray) minor roads is less in this PR than in the current rendering at z11 and below, it is much better than with the current forest color without fading. This PR intends to reduce the contrast between the background colors and the linear features such as roads, which are currently too prominent, especially compared to the rendering at z13 and above.
There is very little difference between the colors used for built-up areas in the current rendering and in this PR. However, the new color is actually a little lighter than the built-up area color in the current rendering at z10 and below, so the contrast with gray roads should be very slightly improved. Here's a zoomed-in comparison from z10; current rendering on left and new rendering on right:
This depends on what you understand by "washed out." I'm interpreting this complaint as talking about how the very light landcover looks next to the darker linear features and icons. While the contrast between near-white colors and darker lines is much higher, I see this as a problem, especially since all of the colors were originally designed for the non-faded high zoom levels. |
Oh, that's why we need to switch to ocean polygons first, before changing the river color. |
For what its worth, I'm 500% percent behind improving the water colors. I had actually tested a very similar thing to him a few months ago but scrapped it because of the problem with waterways showing over the ocean like in the last photo. If its not a problem though or there's a fix for it, I think changing the colors is a much needed change. |
Unfortunately #2507 is stalled currently. Well, it all depends what we'll define as a "bug" or as a "feature". If we want to give the best feedback, it's better to show both waterways and different water colors. But if we switch to ocean polygons, we can still give some feedback. I opt for ocean polygons (which would be useful also for some other things), but I'm not sure about different water colors. Visually I don't think ocean needs lighter blue (I don't see it dominating the land, so it could be the same as for other standing waters), but rivers can be made stronger indeed. The joinings between rivers and lakes/oceans will look strange then (visually downside), but the upside would be to clearly show how arbitrary are all the water boundaries. |
Most past discussion on the water color in this style can be found in #1781. Note the difference between inland water and ocean is already shown in this style currently - but only at z0 to z7 and in a way that is relatively confusing for mappers - both due to the styling and because it vanishes as you zoom in. |
I believe this refers to the darker 0.5 pixel wide outline around the land polygons (i.e. on the coastline) at z0 to z7? I'm marking this PR as WIP (work in progress) for now, because it looks like these 4 main colors will work if the river color can be changed, but this change depends on the switch to water polygons. It might be possible to further lighten the forest/tall-vegetation color to work with the current river color, but the visibility of rivers is also an issue on forests at higher zoom levels, and the water polygons have other benefits, so I think we should work on that first. |
Once we have ocean polygons, I will submit another pull request with the darker river color, and then this PR can move forward. If the new river color is accepted, these are examples of the results. I believe the rivers and water bodies are now visible over tall-vegetation at z8 to z12, even in areas with extensive forest: |
And here are some test renderings I made from central Libya, so we can see what an area of desert will look like. Unfortunately there are not very many arid areas with complete landcover mapping, but here you can see some circular areas of irrigated farmland and large areas of sand dunes at z8: |
I'm created a new branch that you can fetch for testing: |
I like the idea of reducing the number of colours in the low zoom levels. However, in the proposed images I think the colours compete too much with the roads. I think we should use less strong colours. |
@@ -230,6 +230,7 @@ Layer: | |||
way, | |||
"natural", | |||
waterway, | |||
water, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Since GitHub lacks general comments for reviews, I attach it to the first change, to make clear what problems need to be fixed - sorry)
There are two problems I see here:
- dark wood spots (this is exactly the same problem as it was when testing color fading changes) - a blocker for me
- I have a big question about what problem exactly resolves reducing colors at low zoom? The whole rationale is about fixing problems which will be probably fixed by Reduce landcover fading at mid-low zoom levels #3952, it's not clear what this particular solution would change in comparison
Please explain the problem with the "high vegetation" color in the test images (used for scrub, woods and forest), considering that this color is actually lighter than the current Why is it a problem to show woodlands and scrub in this slightly lighter green at z11 or z10? Is it because roads, waterways, railways and borders are less prominent? Is it because the trees pattern is not shown below z14? But previously we did not show it at z13.
The reason for combining some of the landcover colors is the same as why we show all developed land as gray at z12 and lower: at these scales many types of vegetation and unvegetated areas are too small be be clearly visible, but if they are a large fraction of a pixel they will change the color of that pixel in somewhat unexpected ways. By simplifying to only 4 (or 5) types of landcover fill, it is easier to pick colors that will blend well together when a pixel is made up of 40% forest, 10% scrub, 10%heath, 20% farmland, 10% meadow, and 5% quarry and 5% sand, for example. I think it would also be reasonable to consider showing all the same landcover colors at low zoom in the same was as at high zoom, but since you have expressed concerns about the Currenly (and even with #3952) we have fading for every landcover fill color, but not water or linear features. This makes is harder to adjust the colors since we have to compare twice as many combinations, considering both the light versions at low zoom level and the darker versions at high zoom level. The current fading also makes it harder to use the map, impairing clarity and legibility, because map users have to learn twice as many landcover colors and need to realize that all the colors change between z10 and z13. While this will improve partially with #3952, if we are going to use a different (BTW, to make a general comment as a review, you can got to "files changed" and click on "review changes" and just type a comment, approve or request changes there, without picking a particular line of code) |
To get to consensus it would be helpful to get an response to the questions above: "Please explain the problem with the "high vegetation" color in the test images (used for scrub, woods and forest), considering that this color is actually lighter than the current @forest color used at z13 higher. "Why is it a problem to show woodlands and scrub in this slightly lighter green at z11 or z10?" "Is it because roads, waterways, railways and borders are less prominent?" I would also appreciate thoughts and comments from other contributors about this PR or alternative ideas. |
To be precise, the current PR is designed to work after the river color has been changed to be darker and more saturated, as suggested in #3896. In theory it would be possible to alter that suggestion:
I don't think any of those ideas are better than the original plan. To address #3513, #3647, #3935 and #3936, an alternative would be to completely remove the landcover fading at low zoom levels, instead of simplifying the number of rendered landcover colors as in this PR. However, this would probably not address @kocio-pl's dislike of the dark wood color at low zoom level. |
I think decoupling this PR and #3896 would be good so we can get this unblocked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A review was requested, but the title indicates this is still WIP.
I agree in principle with reducing the number of low-zoom colours to four.
By which method? Just merging it without the water color changes, and accepting that waterways will be harder to see at low zoom level? But kocio-pl was also unhappy with the color used for woodlands and other high vegetation areas (which is lighter than the current wood/forest/orchard colors, but darker than the faded landcover):
I asked for clarification about this above (#3670 (comment)) but did not receive a response. |
5dfb8e2
to
e344d55
Compare
Rebased for v5.0.0, includes the 3 water colors. |
4 colors: tall vegetations, low vegetation, bare ground and built-up (developed) land Glacier, water, mud, and land-color will also be shown. Farmland is still shown separately to z11. Wetland and sand patterns are still shown early, though this may need to be reconsidered. These colors are similar to those used in Christoph's alternative-colors fork Remove low-zoom fading Fix zoom level of airport fill to z11 Change track/pitch lowzoom to builtup
e344d55
to
ec2f0a2
Compare
Fixes #3513 "Missing contrast in mid-zoom levels"
Fixes #3007 "Include spacial urban amenities in 'built-up-upper-low-zoom'"
Fixes #3936 " Landcover and landuse cannot be distinguished at mid and low-mid zoom levels"
Related to #3935 "Roads are too prominent compared to landcover and rivers at mid and low-mid zoom levels"
Related to #3647 "The map appears washed out, more contrast wanted"
Changes proposed in this pull request:
Wetland and sand patterns are still shown early, though this may need to be reconsidered.
These colors and zoom levels are very similar to those used in @imagico 's alternative-colors fork
One change that has NOT yet been made is to the 1 pixel limit for the size of landcover areas that are rendered. While reducing this limit would improve the rendering at low zoom levels, it also might affect performance, so this is one significant difference from the alternative-colors style. Further improving this should be considered in another PR.
List of landcover types in each of the 4 new low-zoom color categories:
Vegetation-low:
#ddecbd
Vegetation-tall:
#b6dca6
Bare_ground:
#efe7d9
(Sand and bare_rock still have patterns)
Built-up:
#d7d4d3
Landcover and related area fill colors that are still rendered with separate colors
Explanation
In PR #2654 the landcover colors were faded from z12 to z10. At the time landcover was not shown at very low zoom levels. Later, landcover rendering was extended to as early as z5, however the fading was not changed ("Showing natural areas on z5+" PR #3458 )
Some other styles, such as the French fork, show landcover at full intensity even at lower zoom levels (though the French style uses a pre-processed z12 landcover rendering to speed up this process0
However, this leads to problems when a single pixel covers several different types of landcover, as often happens at low zoom levels. The final color may not be very intuitive.
@imagico suggested instead combining many of the landcover colors into a simpler pallet. With only 4 main colors, it's clear that a darker green pixel is mainly tall vegetation, a light green pixel is low vegetation, mid-green is a pixel with a mix of vegetation types. Also, any shades toward gray are areas with developed land, and light orange/brown tones are bare land, such as rock and sand.
Further issues:
This PR is not a perfect solution to low-zoom rendering, because there is still a pixel size limit that prevents very small areas of landcover from rendering. However, this is a problem with the current rendering as well, especially at z8 and below.
It could be possible to add a couple more types of landcover to the list of separate colors (currently water, glacier, and mud): for example farmland or sand and beach, which are currently rendered separately till z11 in this PR. I also tested another version with a mid-vegetation color for heath, scrub, and vineyards, about half-way between the tall and low vegetation colors.
However, these complications would make the resulting blended colors slightly more difficult to interpret at low zoom levels, and the visible difference is quite small in most places.
Test renderings with links to the example places:
Opolskie, Poland:
https://www.openstreetmap.org/#map=10/50.506/18.545
z6 Before
z6 After
z7 Before
After
z8 Before
After
z9 Before
After
z10 Before
After
z11 Before
After
z12 Before
After
Wales, Great Britain
https://www.openstreetmap.org/#map=10/51.4901/-3.1603
z5 Before
After
z6 Before
After
z7 Before
After
z8 Before
After
z9 Before
After
z10 Before
After
z11 Before
After
z12 Before
After