fix(tiles): height must be double precision, not numeric - #74
Merged
Conversation
ST_AsMVT has no MVT value type for numeric and encodes it as a STRING. Caught by decoding a dynamic tile against its static counterpart: static : "height": 3.25 dynamic: "height": "3.25" Both incident.json and the four QuickScan layer configs feed ["get","height"] straight into fill-extrusion-height, which needs a number — every one of those layers would have rendered flat. building_tiles has always declared height as double precision, which is why the buildings source never hit this. Already applied to prod (the tables were recreated from the corrected files and repopulated); this lands the same state in git. After the fix the facade_scan tile is property-for-property and value-for-value identical to the static one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Follow-up to #73, which was merged before this landed.
ST_AsMVThas no MVT value type fornumericand encodes it as a string. Caught by decoding a dynamic tile against its static counterpart at the same z/x/y:config/layers/incident.jsonand the four QuickScan facade configs all feed["get","height"]straight intofill-extrusion-height, which requires a number. Every one of those layers would have rendered flat once the frontends cut over.building_tileshas always declaredheight double precision, which is why thebuildingssource never hit this.State
Already applied to prod — both tables were dropped and recreated from the corrected files, then repopulated via
f/fundermaps/data/refresh_layer_tiles. This PR lands the same state in git so the two don't drift.Verification after the fix
Decoded dynamic vs static at
facade_scan/14/8365/5444— identical property set and identical values:Also swept 60 real static tiles across all five sources and compared feature counts. Per-tile counts differ where data clusters on a tile edge (static carries tippecanoe's wider buffer of features that fall outside the tile). To confirm nothing is actually lost, I compared the set of
external_ids across a 4×4 z12 block:So every feature appears in the tile that contains it; the count gaps are buffer duplication only, and match how
building_tilesandbuilding_cluster_tileshave behaved in production since July.🤖 Generated with Claude Code