-
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
Restore linear coastline rendering #3926
Comments
Florø, Norway: lots of small islands and ferries. Here it's absolutely necessary to use |
I like the 3 px gradient version the most and would be happy to see the outline again, especially on higher zoom levels. |
First of all this is not what you'd normally call an outline. The line is fully on the water side of the coastline. This is of fundamental importance to keep in mind i think because if you render this in a styling that looks like an outline it would leave a biased impression of the coastline being further to the water side than it actually is. There are two big things that are unclear to me so far:
Since you use colors for this edge rendering that are identical or similar to other water colors you use keep in mind there might be a significant risk that the edges are mistaken for mapped geometries (like waterways or narrow water polygons) and this could negatively affect mapper feedback and readability in general. This of course depends on the zoom level range where this is to be shown. |
True. It's sort of like an outline of the land (not the water), but it's more correct to say that it's slightly increasing the saturation and darkness of the water pixels nearest the coastline. What should I call it in the title of this issue? "Linear coastline rendering"? "Coastline gradient?"
If we implement #3854 then we will have a different rendering for areas mapped as beach, shoal, reef, etc which are outside of the coastline. This proposed rendering will help make it clear where the coastline (mean high water spring line) is located within these features. It also makes it easier for map users to visually follow the coastline when there are changing landcover features next to it, or many small inlets or peninsulas. This also has the effect of highlighting the location of islets and islands, which might otherwise be missed then they are just a couple of pixels in size.
At lower zoom levels only a very narrow line/gradient can be used, otherwise small islands are overemphasized. But a 0.5 pixel wide line works even at low zoom, in my tests. At higher zoom levels a wider gradient could be used
Right, that's why we shouldn't use anything wider than pixel at low-mid zoom levels, and a 2 or 3 pixel gradient is the max that is feasible at high zoom levels. We don't want a tidal channel or narrow inlet to look like a river or canal. |
Your sample images here (and elsewhere) vary in overall coloring in a way that is quite clearly not intended. That probably is due to the usual PNG metadata and the way browsers process that. This can be a cause for a lot of confusion when discussing colors so you should make sure you process all your sample images exactly identically.
But the whole idea of separately adjusted rendering of beach, shoal etc. is that they are equally recognizable and the water line is equally recognizable on all kinds of waterbodies. If you now add a special edge rendering to ocean only that would only affect the ocean case and i think that would kind of counteract the whole idea and would make reading the map more confusing. In any case wouldn't that be something better to discuss after we have implemented these things?
Following the coastline yes, but i am not sure this is actually that beneficial.
Yes, for the lower zoom levels i think that would indeed be a clear benefit.
But increasing the line width with the zoom level could further emphasize the impression that it is actually a mapped geometry. If i take your last example from z5 - we currently have no meaningful inland waterbody rendering at this scale but if we had and we also had differentiated coloring for different classes of waterbody this kind of edge rendering would obscure the color differentiation and it would not be clear if some coastal water area (like a small inlet) is mapped as inland water or if it is just the highlighted outline that creates this impression. The only way to avoid this would be to use a color for the edge rendering that is distinctly different from all the water fill colors. And that would probably make it look like an actual outline with the mentioned problem of creating a biased impression. |
Sorry. They were made with different colors for the ocean. Since this issue is just about the idea, I included test images with two different ocean colors and a couple different gradient and outline ideas.
The oceans are the main water bodies which are strongly effected by the daily tides, so the high tide line vs low tide line distinction is more significant for features along the coastline compared to the edges of lakes or rivers where variations in water level are either seasonal or ephemeral.
Yes.
It helps improve mapper feedback if mappers can clearly see the position of the coastline. And since the shape of the coastline is the most recognizable feature for most areas of land near the coast, being able to see the coastline clearly is also helpful for general map users to be able to quickly recognize places on the map.
Right, it should not be increased by more than 50% between zoom levels (unless it's sub-pixel width). Progression could be 0.5 px -> 1.0 px -> 1.5 px -> 2.0 px -> 3.0 px (or stop at 2.0)
For areas less than the width of the coastline rendering (1 to 2 pixels depending on zoom level) it won't be clear if it's a river mouth or fjorde or mis-tagged. But it will not really be clearly visible for such narrow features even without the linear coastline rendering. Zooming in would be necessary in either case. |
@matthijsmelissen, @kocio-pl, @pnorman - you all approved #3065 "Give oceans outline and simplify shapefiles on z0-7". What benefits did you see? |
But you realize that especially in that case a constant width gradient might easily be mistaken for an actual mapping of the tidal range.
But it does not necessarily do that since the line has an offset. It might emphasize visibility of the coastline if the contrast between land and the emphasized edge is stronger than between land and the ocean fill color. But the same effect could then also be achieved without the other problems by changing the ocean fill color overall. |
One other reason to use different colors for ocean and rivers: it is not possible to make a nice looking linear or gradient rendering along the ocean side of the coastline otherwise. But we still need some more arguments in favor of this idea - @matthijsmelissen, @kocio-pl, @pnorman, what was the reasoning back when #3065 was approved? |
Prior behavior
Between PR #3065 and PR #3694 (which reverted the prior PR while switching to ocean polygons), the oceans were outlined at z0 to z7. This was not done at higher zoom levels because it would lead to a line across river mouths and other places where inland water bodies meet the coastline. The coastline was also simplified to make this look better, which led to some problems: see #3695. But in PR #3694 we switched from land polygons to ocean polygons, and the outline was removed.
Proposed solution
It would be possible to restore the outline based on the water polygons, if we use
comp-op: dst-out
andcomp-op: dst-over
as discussed in #3854, and use a different color for oceans and rivers as discussed in #3895 and #3896 - this would allow drawing an outline or gradient around the oceans, without having this line overlap with the land at places where the coastline is deeply indented, in addition to other benefits. The line would not be more visible across river mouths, but will actually make the transition between rivers and ocean more subtle and subjectively pleasing (IMO).The coastline outline could be in the same color as lakes or rivers, or a gradient made of 2 or 3 different colors that transitions between the ocean and river color.
This outline would somewhat emphasize small islands, so it would need to be small at lower zoom levels, but could be somewhat wider at high zoom levels.
Screenshots illustrating the idea:
z15 Age river mouth, Latvia - current
z15 Age - Separate colors for ocean and rivers, 1 pixel wide outline for ocean
z15 Age - 3 pixel gradient outline
z17 before
z17 1 pixel outline
z17 3 pixel gradient
Bremen, Germany
z13 Bremen 2px wide gradient
z14 Bremen 2px gradient
z13 Bremen 1px gradient
z14 Bremen 1 px gradient
The text was updated successfully, but these errors were encountered: