-
Notifications
You must be signed in to change notification settings - Fork 831
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
Use dedicated style for landcover polygons over water #5067
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. |
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: