fix: repair the three coordinates blocking migration 23 - #13
Merged
Conversation
/health named the rows that could not be placed, which is what made diagnosing them possible without database access: id=565923 county=Darke at (1416737.6505, 811329.7090) id=1799534 county=Jefferson at (-0.0001, 0.0001) id=5166691 county=Miami at (1513448.6481, 690888.3803) Two are Ohio State Plane South in US survey feet, loaded without ever being reprojected. A longitude cannot exceed 180, so they are unambiguously not degrees. Reprojected from EPSG:3735 both land inside their own named county polygons; Ohio North and both zones in metres put them in Michigan, Maine and Quebec. That corroboration is the evidence, and the migration applies the repair only where it holds -- a row whose county does not agree is left alone rather than moved somewhere plausible-looking. The third sits at Null Island, the placeholder a missing coordinate becomes, while naming a real Ohio county. ohio_counties holds only Ohio counties, so a name match there is evidence of the state even when the point is worthless. Its region is attributed and its coordinates are left wrong, where they now show up under outside_us_bounds on /admin/data-quality. A bad location belongs in a data-quality report, not blocking a uniqueness migration. Replayed against a database holding the real 88 county polygons and all three rows as production has them: both State Plane rows reproject into their counties, the Null Island row takes OH from its county, and migration 23 completes. Co-Authored-By: Claude Opus 5 <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.
/healthnamed the rows it could not place, which is the only reason thesewere diagnosable without database access:
Two are mis-projected, not junk
Those are Ohio State Plane South in US survey feet, loaded without ever
being reprojected. A longitude cannot exceed 180, so they are unambiguously not
degrees.
The CRS was not guessed. Every candidate was tested against the real county
polygons:
Only EPSG:3735 lands each row inside the county it already claims. Michigan,
Maine and Quebec are the alternatives.
That corroboration is load-bearing, not decorative. The migration applies
the repair only where the reprojected point falls inside the row's named
county — a row whose county disagrees is left alone rather than moved somewhere
plausible-looking. There is a test for exactly that case.
The third has no recoverable location
(-0.0001, 0.0001)is Null Island, the placeholder a missing coordinatebecomes. But it names a real Ohio county, and
ohio_countiesholds only Ohiocounties — so a name match there is evidence of the state even when the point
is worthless.
Its region is attributed; its coordinates are left wrong, where they now surface
under
outside_us_boundson/admin/data-quality. A bad location belongs in adata-quality report, not blocking a uniqueness migration.
Verified end to end
Replayed against a database holding the real 88 county polygons with all three
rows as production has them:
This should be the one that lets migration 23 complete.
🤖 Generated with Claude Code