[in3Utils] (geotrans) fill bilinear remesh edge NaNs with nearest fallback#1266
Merged
[in3Utils] (geotrans) fill bilinear remesh edge NaNs with nearest fallback#1266
Conversation
- Added additional test cases for resizing and interpolating raster data in `test_geoTrans`. - Adjusted assertions in `test_deriveParameterSet` to reflect new logic for handling `nan` values. - Enhanced bilinear interpolation in `geoTrans` to fill `nan` values using nearest-neighbor interpolation.
Contributor
|
Coverage Impact This PR will not change total coverage. Modified Components (1)
Modified Files with Diff Coverage (2)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
…orce NaN validation - Updated documentation to explicitly state that no-data values are not allowed in configuration descriptions for shapefiles and raster files. - Added tests to validate that NaN values are not permitted in non-DEM input rasters, with appropriate error handling. - Adjusted `deriveParameterSet` logic to raise errors for NaN values in non-DEM input files while allowing them for DEM files.
awirb
approved these changes
Apr 28, 2026
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.

Problem
Fixes a remeshing bug where release rasters could contain artificial NaNs at grid borders after interpolation onto DEM resolution/extent. These NaNs triggered:
AssertionError: ... nan values found inside DEM extent - this is not allowed
in deriveParameterSet.checkExtentAndCellSize().
Root cause:
geoTrans.resizeData() used bilinear projection only. Bilinear interpolation excludes cells without a full neighbors at boundaries, leaving edge NaNs in remeshed outputs.
What was implemented: