Repository navigation
Conversation
Contributor
Author
dktue
force-pushed
the
fix/area-filter-763
branch
from
November 16, 2026 10:58
ef6bc09 to
a292257
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Fixes #763, as agreed there (option 3, without the store-time minzoom part).
filter_areameasured each polygon part after it was clipped to the tile. A large polygon crossing a tile edge with only a small slice in the next tile lost that slice, which leaves a straight-edged gap along the tile border.RemovePartsBelowSizenow drops a small outer polygon or inner ring only when its size on this tile is its real size, or when it can't be seen here anyway:buildWayGeometryis never smaller thanclippingBox, also at the end zoom), orSmall slices cut by clipping that reach into the tile are kept. Inner rings need the same check because
fast_clipclips them separately, so a cut hole stays an inner ring.Known remaining inaccuracy, as discussed: a small island of a large multipolygon that crosses a tile edge is kept on both sides.
Results
The shipped OpenMapTiles config only uses
filter_areaonocean, so its output barely changes (Canary Islands: 3 more water rings at z10 and 2 at z11, everything else identical).Finland, with
filter_below: 12, filter_area: 0.5added towater,landuseandlandcover(master vs this PR):Makefile unit tests pass.
🤖 Generated with Claude Code