onthegomap / planetiler

Flexible tool to build planet-scale vector tilesets from OpenStreetMap data fast
Apache License 2.0
1.46k stars 116 forks source link

[BUG] Buffer not applied to fully filled tiles #1098

Closed moodstubos closed 2 weeks ago

moodstubos commented 2 weeks ago

Hi, First of all, thank you very much for this tool! It’s amazing!

I am currently using version 0.8.x with a custom defaultBufferPixels set to 15. This buffer is necessary for proper display in my project: the polygon has a thick outer line style, and without the correct buffer, this line also appears on inner tiles of the polygon.

Issue found: The buffer is not applied to the target tile when a polygon fully covers the entire tile. However, as soon as a polygon intersects the current tile, the buffer is correctly applied.

To Reproduce example polygon + planetiler schema file bug_report.zip

Screenshots upper tile is correctly buffered. bottom tile has no included buffer. image

Environment:

msbarry commented 2 weeks ago

OK yes looks like this was an optimization that precomputes the "fill polygon" once and uses it across every filled polygon feature. I'll change that to create a fill polygon per polygon feature so that the fills respect the configured feature buffer size in #1100

moodstubos commented 2 weeks ago

you're awesome!

I confirm that the problem has been resolved. Thank you