Files
tippecanoe/tests/spindle-shared
Claude 4d761d4307 Don't snap polygons a second time when removing overlaps
Removing the area that a polygon shares with an earlier polygon ran wagyu on
geometry that had already been snapped to tile coordinates, and snapping it
again could change it. In Dane County tile 8/64/93, consistent snapping bent
one block's edge into a 45-degree diagonal that left it a half-pixel
triangle, and when that block's overlap with another block was removed, the
diagonal passed through the corner of the hot pixel of the vertex beside it,
so it was snapped again and the triangle collapsed, leaving a hole between
it and its neighbor. Elsewhere in the same tile, two half-pixel overlaps
were left behind the same way.

The polygons' edges no longer cross after consistent snapping, so the
difference needs no new vertices. So compute it at 16 times the tile
resolution, where the vertices are far from each other's hot pixels, and use
the result if all of its vertices are the original ones. Only if they aren't,
fall back to snapping at tile resolution to the layer's hot pixels.

For Dane County at -D8 -d8 -pt -pn -zg, this reduces the overlapping
pixels at z8, z9, and z10 from 7, 8, and 16 to 5, 3, and 3, and removes the
hole and both overlaps in 8/64/93 at -z8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
2026-12-01 02:13:36 +00:00
..