Repository navigation
feat(tiles): show the most important places at coarse zooms - #854
Merged
Merged
Conversation
conflated.pmtiles' overview and diffed-places.pmtiles now carry each
row's importance, rounded to two decimals, and a tippecanoe feature
filter on it decides what coarse zooms show: the top 1% at z0, four
times as many per zoom above that, and everything from z4 on. Random
dot-dropping is off for these two builds (-r 1); --drop-densest-as-needed
stays as the safety net for oversized tiles.
A per-feature "tippecanoe": {"minzoom": N} would have been simpler,
but with tippecanoe v2.49 it made tippecanoe drop nearly all features.
Part of #713.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Nw5ZNMD34EwRUnASRv4jy
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.
Makes coarse zooms of both tile sets show the most important places, using the
importancecolumn from #853. Part of #713.What changes
conflated.pmtilesoverview (z0–12) gets animportanceproperty and the edit suggestions indiffed-places.pmtilesget@importance. Both are rounded to two decimals, so a tile holds at most 101 distinct values.-j) on that property decides what each coarse zoom shows. z0 shows the top 1% (>= 0.99), z1 4% (>= 0.96), z2 16% (>= 0.84) and z3 64% (>= 0.36). From z4 on, everything is shown. The share grows four times per zoom because each tile splits into four, so features per tile stay about the same.-r 1instead of-r 1.2), so importance alone decides what coarse zooms show.--drop-densest-as-neededremains the safety net for oversized tiles.A per-feature
"tippecanoe": {"minzoom": N}would have been the obvious approach. With tippecanoe v2.49, though, it made tippecanoe drop nearly all features at every zoom: in a Swiss test, 2 of 1,436 survived at z0. I didn't find the root cause, so this PR uses the filter.Swiss test run
Features per zoom in the conflated overview:
The lowest importance shown at z0 is 0.99. The top spiders at z0 are stadt_zuerich_ch, starbucks_eu, soeder_ch, mcdonalds and rotpunkt_apotheken_ch. In
diffed-places.pmtiles, z0 shows 67 features and z2 770, with the lowest at z2 being 0.84.Note that z4–z12 now hold more features than before, since dot-dropping is off. On the planet,
--drop-densest-as-neededwill thin out dense tiles there.Tests
cargo testandcargo clippy --all-targetspass. New unit tests cover the filter, the thresholds, rounding, and both GeoJSON writers. The integration test checks@importanceon edit features.Generated by Claude Code