felt / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
906 stars 78 forks source link

Scale the tile size limit up with the multiplier at low zooms #192

Closed e-n-f closed 7 months ago

e-n-f commented 7 months ago

Prior to this PR, the tile size limit was the same at every zoom level. With this PR, if you specify a --retain-points-multiplier, the tile size limit will be scaled up at low zooms that are expected to contain more features because of the multiplier, and will remain at its usual level at basezoom and higher, where there are no extra features for the multiplier to retain.

This PR also contains a fix for the "compression error 106" problem, which turns out to have happened when bailing out after a tile couldn't be made small enough. In this case it now goes through the standard post-tile-generation cleanup instead of taking shortcuts.

It also contains a change that makes it less likely that a tile can't be made small enough, by trying harder to find a suitable size threshold if the --drop-smallest-as-needed guess yields the current threshold again, which can happen if there are large numbers of points at exactly the same location, which are treated as having an area of 0.