Skip to content

fix(build_csv): fail loud on geographic DSM CRS and missing DSM coverage#6

Merged
wietzesuijker merged 1 commit into
mainfrom
fix/build-csv-dsm-guards
Jun 7, 2026
Merged

fix(build_csv): fail loud on geographic DSM CRS and missing DSM coverage#6
wietzesuijker merged 1 commit into
mainfrom
fix/build-csv-dsm-guards

Conversation

@wietzesuijker

Copy link
Copy Markdown
Member

Two safety guards for the flight-path pipeline:

  • Geographic DSM CRS: align_features_to_dsm now 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.
  • Missing DSM coverage: extract_features_elevations and extract_path_checkpoints now raise a clear error when zonal_stats returns max=None (a buffer over DSM nodata). Previously None flowed into the CSV and later crashed mission generation on float("None").

Adds regression tests covering both (geographic-CRS reject, all-nodata DSM reject). 21 tests pass.


AI (Claude) supported my development of this PR.

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).
@wietzesuijker wietzesuijker merged commit 8dfa941 into main Jun 7, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant