-
Notifications
You must be signed in to change notification settings - Fork 849
Use dedicated style for landcover polygons over water #5067
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
base: master
Are you sure you want to change the base?
Conversation
Very nice! Is this using Kosmtik for display / rendering? I've tried testing the PR with my renderd set-up (mapnik 3.1.0 claimed), but the ocean dst-over fails: I haven't had much success with the mapnik compositing operations, but this may reflect an ageing mapnik version. There is little chance of working out from the horrific mapnik documentation what was working correctly in what versions. P.S. I haven't looked over the code in any detail, but did notice that you have a repeat SQL query for the ocean cutouts and ocean fills (these can be cached e.g. as the amenity-points query). |
Thanks for working on this. A number of remarks:
|
Yes,
I agree that the landcover patterns should be doing most of the work. But I do think that some surfaces will be hard to differentiate on pattern alone against a blue background, and so limited use of new colours may be helpful e.g. My main concern is whether to restrict the PR to ocean and optionally tidal |
World wide most
Currently beach and shoal are rendered identically - changing that would be a separate design decision. See also #3864. |
I included this, thanks.
No longer needed thanks to the point above.
Removed it.
That was my first attempt, but it didn’t look very nice. I retried it, and it looks like we can find a single colour that works well after all. Colours and patterns still need some fine tuning. I haven’t fixed glaciers yet.
My first draft only rendered landcover polygons over the ocean, and I’m very unsure about including regular water polygons in this PR, so I can remove them. Filtering on Current state: |
Yes, with Mapnik 3.1.0. |
As a reference for discussing design: IMO using the tidalflat over water fill color also on the vegetated tidal wetlands has some appeal. It would avoid weird looking cases like here: https://www.openstreetmap.org/#map=16/53.67236/6.97125 It will work less on non-tidal wetlands that are practically mapped over water, primarily |
Thanks for clarifying. It seems that everything works fine with the raster output of mapnik 3.1.0, but there seem to be issues with the Cairo rendering (used for SVG/PDF). It would be a shame to lose vector output - high-quality print maps being an important personal use case. I suspect that these issues may be resolved in Mapnik 4.0.x (there do seem to be a lot of interesting fixes/editions in the 4.0 release), but I think that switching to Mapnik 4 is a discussion for another day, and breaking vector output is probably an acceptable trade-off for improved functionality.
I had misunderstood the significance of the river test (it was a river in a tidal/ocean area). But I do think including The "sands" have been mapped as
That works. One design decision would be whether to only render |
Because they're drawn behind everything else, we can use a single polygon covering the entire planet. Co-authored-by: Christoph Hormann <[email protected]>
And show beaches/shoals as early as mudflats.
Tidal landcover is now only rendered over oceans and water polygon tagged
That’s one of the main motivations for having a fill colour for these polygons. Currently in many places the areas closer to the coastline appear more water-y than the tidal flats further at sea, when they spend less time under water. With a fill colour for all tidal landcover we can have a more consistent land to intertidal zone to sea transition.
Yes, tidal flats become just one among the list of landcover polygons rendered over tidal areas. This way the incentive to tag some areas incorrectly (or in a less precise way) in order to make them show on the map should disappear.
That’s unfortunate. It would be interesting to test with Mapnik 4. If these issues are fixed, it would at least give a way forward where no functionality is lost. But I don’t know if Kosmtik is even compatible with it. |
We need to be careful with that for two reasons:
By the way: While, so far, the only landcovers suggested for special rendering over water are physical geography characterizations, this does not have to stay this way. It would, for example, be potentially worth considering rendering certain industrial landcovers (like wind parks, solar farms) in such fashion as well - and that would not be limited to a tidal setting. It seems |
As I understand it, the PR would be introducing rendering that is especially useful for tidal cover - where the normal landcover is periodically covered by water. So I don't think there would be an incentive to add I agree that "riverbank polygons for example are not split at a well defined limit of the tidal influence", but the split between river and ocean is particularly variable - in some cases, the coastline is fixed at the river mouth (leaving large areas as tidal river, as the Humber above), while in others the coastline is pulled far inland. Rendering tidal patterns over ocean but not tidal river would drive a lot of coastline changes.
Yes, I can see this point. You can have a "river beach" or area of shingle that extends into the water, and I imagine that a lot of river / river areas are directly mapped over say
Let's ignore this. Using Carto for SVG/PDF is probably a fairly niche application. Mapnik 4.0.1 is available with the current (short life-time) Ubuntu release, so could in theory be tested. It will probably be next year before the Long Term Support version of Ubuntu defaults to Mapnik 4. |
Indeed, tagging tidal landcover features with What I think we want to avoid, in order to conform to current mapping practices:
What we can do is:
This way the case of a forest drawn over a river isn’t affected, and the rendering lets mappers decide what should be considered tidal through tags. We could even opt for not rendering tidal landcover polygons over land. The idea here being that by forcing polygons to be either tidal or not tidal, we can avoid pushing mappers towards adding (In fact, it would even be possible to ignore ocean and water polygons altogether, do no cutouts, and simply rely on Of course some polygons that are intended to represent tidal areas are missing the
That’s a good point, and a thing to consider for further improvements.
I tried generating SVGs with Mapnik 4.0.1 and it works. The files are quite large though (multiple megabytes), due to patterns. I haven’t tried to do the same on |
To avoid different people working for and arguing about different goals: #3854 and #3840 are about differentiating better landcover and water overlapping in general, not just tidal area depiction. That is a useful aim under the goal of the project independent of what the aim of the overlap in mapping is and even if the overlap is not intentional. Overall we have essentially the following classes of landcover:
Regarding intermittent water: We currently render that with an overlay pattern. The specific pattern is poorly readable and should be changed - but the principal idea of using a - partially opaque, partially fully transparent - pattern is sound. I have not seen any viable alternative suggestion so far. However, with such a pattern in use the fully transparent parts of course need to have the land version of the landcover shine through and not the water version. Otherwise it would be intuitively misleading. These are my ideas on how to approach this matter - but feel welcome to develop ideas and argue for them beyond that. You should stay, however, close to current consensus mapping practice in OSM. A rendering concept that is based on an ideal mapping and tagging model that does not have broad support among mappers is not going to work for us. |
I mostly concur with this, but with a few reservations
I'm not sure that the
I'm wary of introducing "error stylings". The existing tools of either a pattern that is sufficiently distinctive so that errors are obvious (a lake in the middle of a wood needs a multi-polygon) or not rendering (
There's extremely low usage of In terms of the current PR, am I right in thinking that the outstanding issues are:
|
No, but that is not a practically relevant problem. The common type of larger error in
This is not my main point here. The important thing is not to hide mapping in situation where it cannot be correct. And since different styling over water and over land is therefore going to be needed, making the styling over land (which - in case of tidalflat - is universally incorrect mapping) decidedly not implying something is correctly mapped is worth considering. It does not have to loudly scream error or even appear distinctly wrong. It should just not positively communicate to the mapper that this is correct mapping.
The absolute numbers say relatively little here since both
|
Fine - I hadn't visualised the scenario you were thinking of.
True, but 12k uses is a pretty small number globally given that the majority are likely to be covered by tidal water. Either way, I don't think adding specific rendering for Ultimately I was keen to narrow down if any further changes are needed in this PR. |
Fixes #3854
Fixes #3707
Fixes #3840
This PR allows rendering on-land and over-water landcover polygons separately, in order to have different styles applied to each case. Compositing operations are used to achieve this: first the landcover polygons are drawn in their on-land style, then water areas are cut out, landcover polygons are drawn in their over-water style (when they have one) from below, and finally water areas are drawn, from below as well.
Before-afters:
Overview of affected styles:
Notable points: