Fix a bug where NaN values arise in band arithmetic or raster calculator. This will happen if you do something like 0 / 0. Similar to Infinity, this PR will filter out NaN values and replace them with the noDataValue.
What is the Motivation for the PR?
Fix dem bugs
What Tests are Included?
Added a test which deliberately sets NaN results and checks to see if the computed raster has NaN values.
Type of PR
What is the Goal of the PR?
Fix a bug where NaN values arise in band arithmetic or raster calculator. This will happen if you do something like 0 / 0. Similar to
Infinity
, this PR will filter outNaN
values and replace them with thenoDataValue
.What is the Motivation for the PR?
Fix dem bugs
What Tests are Included?
Added a test which deliberately sets
NaN
results and checks to see if the computed raster hasNaN
values.