mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 00:45:41 +02:00
* Only skip polygon cleaning if we are still at very high resolution * Remove collinear points and clean polygons even at high resolution * If we truncated but still have the data and need to drop, revive * Deduplicate by ID even when the duplicate is clipped away * Test that deduplication works across tile boundaries * Write out children of a tile revived after its parent truncated A tile writes the geometry for its children on pass 0 of its zoom level, and the later passes, which are only retries with new thresholds, must not write it again. But a tile whose parent truncated its pyramid is skipped on pass 0, and is only revived on a later pass, once the zoom has had to start dropping features. Gating on pass 0 meant its children were never written at all, so a revived tile was always a dead end: it appeared in the output at ordinary detail with nothing below it, even though its truncated ancestor still held the full-detail geometry. Write the children on whichever pass first tiles the tile instead. The dropping thresholds only ever increase within a zoom, so for a revived tile that is exactly the pass on which the zoom started dropping. Also collect the three thresholds into dropping_features(), since write_tile() and run_thread() have to agree about when truncation is disabled and when a skipped tile comes back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Treat dropping by attribute like the other ways of dropping features --drop-by-attribute-as-needed was added after variable-depth pyramids, and minattribute never made it into the test for whether a zoom level is discarding features. A zoom that was dropping by attribute could still truncate pyramids, so some of its tiles became full-detail leaves while the rest of the zoom had features dropped out of them, and tiles skipped because an ancestor had truncated stayed missing. Unlike the other thresholds, minattribute starts at the infinity on whichever side is being kept rather than at zero, so dropping_features() now takes the direction too. On tests/tl_2022_11_tract at -Z10 -M15000, zoom 11 was dropping by attribute and truncating two pyramids at the same time; now it truncates none of them and the tile that had been skipped under zoom 10's truncation is written out. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Delete the merged tile that the deduplication test leaves behind overzoom-test removes merged-dedup.pbf.json.check but not the merged-dedup.pbf it was decoded from, so the file was left in the working tree after every test run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Document what variable-depth pyramids now do to geometry and to dropping Truncated tiles are no longer left uncleaned: they keep every vertex that isn't collinear with its neighbors, but their polygons are cleaned so that overlapping areas are merged instead of stacked. Say so, and say that dropping features at a zoom level now suppresses truncation for the whole zoom rather than for individual tiles. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Start minattribute out at the infinity that excludes nothing dropping_features() reads write_tile_args::minattribute, and the in-class default of 0 decodes as a threshold that has already been chosen. Every path assigns it from zoom_minattribute before anything reads it, so this changes no behavior, but a future one that didn't would silently suppress pyramid truncation rather than fail visibly. -HUGE_VAL is the value that excludes nothing for the ascending order that drop_by_attribute_descending also defaults to, so the two members agree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Regenerate the drop-by-attribute fixture through the test harness The Makefile can't be asked for a target whose name contains an =, since make reads that as a variable assignment, so this fixture was generated by hand into a scratch directory. The output path ends up in the tileset's name, description, and generator_options, and tippecanoe-decode is only passed -x generator, so all three were compared against the harness's .check.mbtiles path and could never match. make test failed on it. Regenerated with the same output path the rule uses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Restore the -z14 -M25000 variable-depth fixture This configuration was dropped rather than regenerated when the -z17 -M10000 fixture was added. It still runs, so it was losing a passing regression test for no stated reason. Regenerated against current behavior. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Encode the = in the drop-by-attribute fixture name as %3d A test output name containing an = can't be asked for on the make command line, because make reads that argument as a variable assignment, so the fixture couldn't be regenerated through its own rule. Add %3d to the punctuation escapes that testargs decodes and use it here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp * Regenerate the man page for the README change The variable-depth pyramid option's description changed, and man/tippecanoe.1 is generated from README.md, so the committed page no longer matched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp --------- Co-authored-by: Claude <noreply@anthropic.com>