Skip to content

Commit 885223e

Browse files
committed
is_data: Output raster should not have nodata values
1 parent 7a1e4d2 commit 885223e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

algorithms/include/gdx/algo/nodata.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ template <typename InputRaster, typename OutputRaster>
4949
void is_data(const InputRaster& input, OutputRaster& result)
5050
{
5151
using TDest = typename OutputRaster::value_type;
52-
std::transform(optional_value_begin(input), optional_value_end(input), optional_value_begin(result), [](auto& value) {
53-
return TDest(value ? 1 : 0);
52+
std::transform(optional_value_begin(input), optional_value_end(input), result.begin(), [](auto& value) {
53+
return TDest(value.has_value() ? 1 : 0);
5454
});
5555
}
5656

0 commit comments

Comments
 (0)