Skip to content

Fix: Handle no-data values in TIF files during prediction tests #1270

Closed
henrykironde wants to merge 7 commits intoweecology:mainfrom
henrykironde:noDataValue2-testempty
Closed

Fix: Handle no-data values in TIF files during prediction tests #1270
henrykironde wants to merge 7 commits intoweecology:mainfrom
henrykironde:noDataValue2-testempty

Conversation

@henrykironde
Copy link
Contributor

No description provided.

Previously, when reading TIF files with rasterio, no-data values were
not masked before normalization. This caused invalid values (e.g., -9999
normalized to -39.2) to be passed to the model, potentially affecting
prediction accuracy.
- Rename read_raster_window to apply_nodata_mask
- Combine src.read() with masking in single function
- Use rasterio's dataset_mask() for efficient masking
- Update all call sites to new signature
@henrykironde
Copy link
Contributor Author

duplicate #1102

@henrykironde henrykironde deleted the noDataValue2-testempty branch January 22, 2026 02:37
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