gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 817 forks source link

Rendering artifacts between small forest parcels at z10 #3674

Open jeisenbe opened 5 years ago

jeisenbe commented 5 years ago

Expected behavior

An area of forest, which is broken up into landuse parcels, all of which are tagged landuse=forest or natural=wood, should render the same as a single large polygon of landuse=forest

Actual behavior

In some areas where the polygons that make up a forest are small rectangles, there are visible faint white (or lighter green) lines between the parcels. This is most visible on z10 in areas such as southern Poland, where many forested areas are composed of 400x400m parcels. It is not very noticeable on the current rendering, with fading at this zoom level, but is quite clearly seen if the darker color is used.

Links and screenshots illustrating the problem

Near Opole, Poland: https://www.openstreetmap.org/#map=10/50.8554/17.9970

Current rendering (Exported from Kosmtik) z10 white-boundary-artifacts-opole

Master branch, with fading removed z10 opole-artifacts-nofade

Screenshot from openstreetmap.org, zoomed in: z10-opole-screenshot-artifacts

Inspector view of forests near this area in Kosmtik:

imagico commented 5 years ago

This is not a new problem at all - it just went mostly out of sight with the land cover fading.

Background info can be found in #672, #1043, #1117, #1566.

and for explanation of the fundamental reasons for this http://imagico.de/map/polygon_rendering.php

jeisenbe commented 5 years ago

It sounds like the solutions are (see http://imagico.de/map/polygon_rendering.php):

0) Keep reducing the polygon-gamma

1) Significantly improve polygon rendering in Mapnik upstream

2) Use as a raster mask for landcover at z10 and lower. This could be created with: a) the supersampling technique described at http://imagico.de/map/polygon_rendering.php or b) Render the landcover alone based on full planet data at z12 or z13, which would then be adjusted for use at z10 and lower.

3) Use reduced-size polygon file(s) for landcover at low zooms as described inhttp://imagico.de/map/polygon_rendering.php

4) Use simplified landcover polygons

5) Use generalized landcover polygons

Option 1 requires someone with the necessary ability and time to work on Mapnik. I've no idea if this is possible.

Option 2a could be done by anyone with the rendering setup, but still requires a full-planet database to create the files monthly, and a server to host them.

Options 2b, 3, 4 would require adjusting the techniques used to create the coastline/water files to make new data files, and they'll need to be hosted at openstreetmapdata or another frequently-updated source (hopefully once per month).

Option 5 probably requires coding new tools, so that the different types of landcover match up when generalized, and hopefully are similar to the generalized water polygons as well?

Any other ideas?

Adamant36 commented 5 years ago

Faster rendering would be great. It seems like all the options have their own obstacles to implementation though. If it were me, I'd try the Mapnik route first. Since its still kind of being developed and other people using it would benefit. Then if that doesn't work try another option. Although, I have no clue which one.

What option are you leaning toward?

jeisenbe commented 5 years ago

What option are you leaning toward?

I am not capable of creating or hosting any of these raster or shapefiles, nor am I qualified to help develop Mapnik.

But I would be very happy if anyone wants to work one 1, 2, 3, 4, or 5 ("0", changing polygon-gamma, has already gone about as far as it can)