-
Notifications
You must be signed in to change notification settings - Fork 822
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
Low-zoom coastline simplification and outline problems #3695
Comments
Is everyone happy with the simple solution of removing the outline and simplification in PR #3694 - or should I show some more examples of rendering with the generalized coastlines at z0 to z7? |
The outline also over-emphasizes tidal channels in mangroves and saltwater marshes, and river mouths, eg: z7 Timika current rendering |
I admit that in places with irregular coast (Timika, small islands) dropping border works well but in other places losing border makes map worse. I am not sure what is preferable. |
The question that arises is what the goal of #3065 is. I consider it highly problematic in terms of mapper feedback (both due to the errors shown here and due to other issues it is very hard for mappers to understand how the appearance in the map relates to how things are mapped without an in depth knowledge how things are rendered). And i also don't think it really serves as a usable example for other map styles because of inherent flaws in the method used and since parameters have been tuned to work around the various problems (like the 180 degree meridian artefacts, small islands, the wrong drawing order). Independent of the specific technical issues having a special rendering style for coastlines at z0-z7 but not above indicates a specific low zoom design idea for the map. But so far i don't see this. Most map styles that draw coastlines or waterbody outlines in general with a line do so at large scales, not at small scales. |
Timika is probably not a good example : mappers extended coastline (https://www.openstreetmap.org/relation/8661308#map=13/-5.0509/137.4330) along rivers (https://www.openstreetmap.org/relation/8504221) which explains the weird pattern |
Timika is probably not a good example : mappers extended coastline (https://www.openstreetmap.org/relation/8661308#map=13/-5.0509/137.4330) along rivers (https://www.openstreetmap.org/relation/8504221) which explains the weird pattern
Most of those are not rivers but tidal channels in mangroves. They are
filled with salt water and the flow changes direction with the tide.
Some of the channels are connected to rivers, but these sections of
the rivers are tidal estuaries, and should be mapped as outside of the
coastline.
But similar effects can be seen in areas with fjords and rias (flooded
glacial and river valleys), eg Norway and Cornwall, or in areas of
salt marsh with many tidal channels
https://wiki.openstreetmap.org/wiki/Proposed_Features/Coastline-River_transit_placement
|
That happened to some places that I map where people extended the river area miles up streams. It was rather irritating. I think the blue outline would be good in cases where the coastline is mostly straight, but not in most of the examples here. Is there a way it can be toned down enough to not stand out as much or make it only apply to semi-straight coastlines (that would probably look inconsistent)? |
Indeed. Coastline placement in the OSM database is and should be a matter of local observable properties, not of what is considered cartographically desirable for a specific styling idea at a specific map scale. This style should incentivize the former, not the latter. A styling concept that emphasizes the significance of the coastline at low zooms but de-emphasizes it at high zooms does not really support this however. The discussion here IMO should focus on the cartographic merits of #3065 w.r.t. to the goals we have. It would be good to get the input from those who originally discussed this change (@matthijsmelissen, @kocio-pl and @pnorman). There is not much in the PR discussion beyond the expression of subjective like for the change. |
I'm in favour of removal as this issue has brought up places where it fails badly. |
The goal is to increase contrast between water and land, which makes the map easier to read, especially around complex coastlines. With respect to the proposed revert, I'm fairly neutral. |
A general point: personally I am against optimizing for 2x exports at the cost of the 1x version as long as openstreetmap.org renders the 1x version. |
I don't think @jeisenbe showed the high resolution samples as a problem per se but to better illustrate problems observed at normal resolution. If the aim is purely to increase contrast of the land-water boundary the line simplification does not appear to be useful. A dark halo around land areas on the water side is something that can work nicely without the distortion inherent to geometry modification steps. |
For me current rendering improves clarity. Less details together with better visible line at lower zoom levels works great in most of the cases. Timika etc. is visually worse (but still acceptable for me) and conceptually it's highlighting the special data situation there (we claim there are some kind of small ocean islands, not part of the land). |
@matthijsmelissen - what i still don't understand about #3065 is the reason why z0 to z7 and not above. Was this because of interference with landcover rendering (which back then started at z8)? That would mean #3458 was essentially incompatible to some extent with #3065. The effect is relatively subtle though (some additional non-uniformity in the line where landcover is mapped near the coast) and it probably is even more so at z8/z9 so it seems doubtful this played a role. |
It's because I wanted to avoid blue lines crossing rivers at the place where rivers run into the sea. At z7 and lower this is not noticeable in most places because rivers at these zoom levels are very thin. From z8, some rivers start to become multiple pixels wide at the place they reach the sea, and the line diving rivers and sea would become noticeable. Landuse has nothing to do with this. |
Ah, ok - thanks. |
It looks like @kocio-pl is still in favor of using generalization and outlines at low zoom, @matthijsmelissen and @matkoniecz are neutral, @imagico and @pnorman are opposed to the current rendering with outlines. I would suggest merging #3694 for now, which will remove the current simplification and outlines. The option that would provide and outline with better results would be to use the generalized coastlines from http://openstreetmapdata.com/data/generalized-coastlines - which conveniently are provided for z0 to z8. These still show some problems in areas with many tidal channels, but they do not have any issues with missing islands, and the generalization process as a very nice cartographic result. However, they are even more simplified/generalized than the current low-zoom outlines. But we need to decide on this soon, if we want these shapefiles to stay available. See: https://blog.jochentopf.com/2019-03-07-the-new-osmdata-service.html "We are currently not offering the Generalized coastlines, the Reduced waterbodies as raster mask and the Reduced waterbodies as polygons on the new service. We might bring them to the new service, but this depends on whether people actually need these. Please contact me if you currently use any of them." Greece at z6 with generalized coastlines: Compare to z6 rendering with simplified water polygons (i.e. with PR #3694) And here's z7 Wales with generalized coastlines (and landcover colors simplified as in PR #3670) Compare to z7 Wales with current coastline style (same landcover colors as #3670): z3 Indonesia with generalized coastline and outline: z3 Europe, after #3694 (without outline): |
Here are some more comparisons with generalized coastline shapefiles vs current rendering and outline-less rendering. Papua, Indonesia (as mentioned in the comment above) z6 without outline (after PR #3694) z6 generalized coastline, thicker outline z6 less generalized (using shapefiles 1 zoom level lower than designed)
|
Scotland, UK: z7 without outline (after PR #3694) z7 generalized coastline, thicker outline z7 less generalized (using shapefiles 1 zoom level lower than designed) |
Its a trade off definitely. z6 without outline (after PR #3694) is harder to see without the outline. It's to bad water isn't a tag darker. |
Note moving further processes from openstreetmapdata.com to the new platform is not a matter of urgency, it is a matter of available time to actually do so. The generalized coastlines currently have the lowest priority in that regard. One of the main advantages of the new platform is that different processes are more compartmentalized now so it is relatively easy for anyone to develop new processes within this framework and add them. Anyone is welcome to do so on https://github.com/fossgis/osmdata. The other question is of course how much pre-processing of data is actually desirable. I am generally in favor of this where it is needed for constructive mapper feedback and a process exists to do so but i don't really think this style is a place to add complexity in pre-processing just for eye candy so to speak. |
If we want to discuss generalized coastline that should be its own issue and we can then keep this confined to just the switch to ocean polygons. |
Now that #3694 is merged, we should decide if the outline is important enough to be worth the extra complexity and the dependence on external shapefiles. One objection to the current outlines is that they did not extend to lower zoom levels. This was because the line would look strange when cutting across rivers and estuaries. However, this issue has a solution: if we change rivers to a darker color as planned, then the outline for marine waters can be the same color as the new river color. This way, the marine water outline blends perfectly with the river water color. Here are examples with the 3-color water system, using the generalized coastlines and shapefiles for < z8 and the simplified and split water polygons and coastline shapefiles for z9 and up: Anchorage, Alaska z7 current Bremen, Germany |
That does not seem a good idea because it would introduce a water bias and would give confusing feedback to mappers showing the ocean outline in a way that looks like a river geometry. I would suggest to close this issue because the specific problems discussed here no more apply after #3694 and instead would open specific issues on problems we have and address them in the best way possible. But it would probably make sense to put priority on those things that have been waiting for the move to ocean polygons and layer-reordering. One thing i hope this subject has shown to everyone is that you have to be careful making design choices that severely limit your options w.r.t. other changes and that maneuver the style into a position where you can't improve anything any more without sacrificing central goals or reverting previous choices made. What i would like to see - and which kind of goes into a similar direction as your samples is an edge emphasized (in terms of color) rendering of oceans that does not introduce a land or water bias and that does work independently of geometry simplification. This is not trivial, it probably requires some comp-op magic similar to what @sommerluk developed for the unpaved roads. And i am not sure if the results would actually be desirable to have in this style. But it would definitely be something to try out. |
Do you mean that it would cause narrow sections of coastline to appear wider than they are in reality, eg tidal channels, narrow bays? We do show narrow rivers and streams as wider than their actual sizes at these zoom levels.
Yes, that is an issue
That would be great. It seems like having a gradient that gets lighter with increasing distance from the edge of the polygon would be a great way to render the marine environment; this is frequently seen on historic paper maps. I couldn't find any documentation of this in Mapnik. |
I mean the outline drawing indicating the extent of the water area being larger than as it is mapped systematically decreasing the size of land and increasing the size of water in rendering. This is different from centerline drawing of waterways where the line signature is never meant to indicate the water covered area.
Mapnik has no native support for gradients, you'd have to approximate such with multiple lines in different colors. |
I'd do it with MSS similar to how we do nature reserves, but no transparency. |
Yes, but nature reserves use line-offset and that would depend on unsplit polygons which would lead to the same constraints as we had with the outlines and line simplification. |
We can use the coastline linestrings for the high zoom levels, but it would be ideal to have slightly generalized coastlines up to z9. Right now the generalized coastlines available on openstreetmapdata.com end at z8. It would be perfect to have a transitional level at z9, less generalized that the lower zoom levels. Then we would not need to use Another option is to use the simplified-land-polygons-complete for the coastline outline, and the water polygons to render the water fill, at z9. That's what I did in the examples above, because I have not yet downloaded the coastline linestring shapefiles. But some |
Yes, that goes in the direction i had in mind. But as said you can't use line-offset because the lines are split and this will result in artefacts at the splits: Either gaps or overlaps between the offset segments depending on if the coastline is concave of convex at this point. And you also get further distortion where the offset line drawing of one coastline geometry is drawn over another land feature. Anyway - the logical next step to proceed with the coastlines is to do the layer re-ordering. Anything else like different coloring of different water features or this would come afterwards. |
+1. There were other ideas we had for improvements after switching to water polygons. |
Current Situation
Since PR #3065 the land polygons have been simplified and outlined at z0 to z7. Previously, the land polygons were shown without an outline and without any simplification.
The simplified land polygon shapefiles are used, which have nearly full detail for all land features at z9 and below, but Mapnik's line-simplify option is used to somewhat smooth out the coastline, and then a sub-pixel-width outline is added.
The 0.5 pixel outline is currently offset 0.5 pixels from the coast, which leads to some errors when exporting at higher resolution, when the coastline is particularly curvy. There is also a mismatch between small islands and the outline; some small islands are shown but do not have a visible outline.
When exported at 2x or higher resolution, these problems are even more apparent.
Options for resolving the issue
Revert Give oceans outline and simplify shapefiles on z0-7 #3065 - remove simplification of the water polygons and the outlines
Switch to generalized coastline shapefiles for the outline and generalized water polygons for the z0 to z7 land / oceans
Links and screenshots illustrating the problem
Current rendering of Greece, screenshot:
https://www.openstreetmap.org/#map=5/38.065/24.038
Land polygons only, current master branch:
Zoomed in; missing island outlines are apparent
Exported at 2x from kosmtik:
Exported at 5x from kosmtik:
(Compared to rendering with generalized coastline shapefiles)
The text was updated successfully, but these errors were encountered: