fix(build_csv): fail loud on geographic DSM CRS and missing DSM coverage#6
Merged
Merged
Conversation
Two safety guards for the flight-path pipeline:
- align_features_to_dsm now rejects a geographic DSM CRS (degrees), which would
truncate the x1000 integer distance matrix to zero and yield an arbitrary
TSP route. Require a projected CRS.
- extract_features_elevations and extract_path_checkpoints now raise a clear
error when zonal_stats returns max=None (buffer over DSM nodata), instead of
letting 'None' reach the CSV and crash later on float('None').
Adds regression tests (geographic-CRS reject + all-nodata DSM reject).
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.
Two safety guards for the flight-path pipeline:
align_features_to_dsmnow rejects a geographic (degrees) DSM CRS. Distances and buffers assume metres; a geographic CRS silently truncates the x1000-scaled integer distance matrix to zero and yields an arbitrary TSP route. A projected CRS (e.g. UTM) is now required, with a clear error.extract_features_elevationsandextract_path_checkpointsnow raise a clear error whenzonal_statsreturnsmax=None(a buffer over DSM nodata). PreviouslyNoneflowed into the CSV and later crashed mission generation onfloat("None").Adds regression tests covering both (geographic-CRS reject, all-nodata DSM reject). 21 tests pass.
AI (Claude) supported my development of this PR.