Fix overlapping county borders in well-density-by-county#113
Merged
Conversation
_make_shape applied poly.simplify(0.1) (~11 km tolerance) to each county polygon independently. Adjacent counties share exact boundary vertices in the geoconnex source data, so simplifying each one separately moved those shared vertices in different directions, making neighboring county borders overlap (and gap). This showed up as artifacts in the well-density-by-county view. Drop the simplification and use the full-resolution source geometry. Shared borders stay coincident, so counties tile cleanly. Verified: all 33 NM county pairs now have zero pairwise overlap (previously several overlapped, e.g. Chaves-Eddy). Full-resolution WKT remains compact (~1 KB per county), so spatial-filter query size is unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Your pull request is automatically being deployed to Dagster Cloud.
|
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.
Problem
County polygons in the well-density-by-county view had overlapping (and gapping) borders between adjacent counties.
Root cause
_make_shapeinbackend/bounding_polygons.pyappliedpoly.simplify(0.1)(~11 km tolerance) to each county polygon independently. Adjacent counties share exact boundary vertices in the geoconnex source data, so simplifying each separately moved those shared vertices in different directions — neighboring borders no longer coincided.Fix
Drop the simplification; use the full-resolution source geometry. Shared borders stay coincident, so counties tile cleanly.
Verification
configuses.bounds/truthiness; the/county_boundsworker endpoint just serves the polygon).🤖 Generated with Claude Code