Repository navigation
Remove invalid geo and report - #29
Merged
Merged
Conversation
tombrooks248
force-pushed
the
remove_invalid_geo_and_report
branch
from
July 2, 2026 11:04
d6c09d3 to
0de448a
Compare
This branch was previously deployed
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.
What type of PR is this? (check all applicable)
Description
Update the Postgres loader so geometries are checked after the existing PostGIS repair flow. Entity rows are still loaded first, then the loader attempts to repair invalid/non-simple geometries using ST_MakeValid. But now any geometries still invalid after those repair attempts are nulled in the final entity table.
Why
We mostly handle invalid geometries well, we raise issues for fixable and unfixable geometries given to us, and we fix the fixable ones, the only thing we don't do is remove the unfixable ones. This PR Nulls those invalid ones so that the frotend does not need to run expensive checks when surfacing geometries to users.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
I have pushed this to DEV and run the manual postgres loader and can see the logs, it runs without any errors, although it didn't find any invalid geometries to Null in DEV, but I think the mechanism is tested in the tests and all we are doing is setting a value to Null so pretty limited risk.
I also ran a check on PROD to see if any issues were raised for geometries which could not be fixed and didn't find any. So I think its likely this was in fact never a problem and this whole thing is being very belt and braces.
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.
have not been included
[optional] Are there any post deployment tasks we need to perform?
[optional] Are there any dependencies on other PRs or Work?