diff --git a/src/Raster.cpp b/src/Raster.cpp index 17740d3..5215c07 100644 --- a/src/Raster.cpp +++ b/src/Raster.cpp @@ -63,7 +63,7 @@ namespace RasterTools { if (a==MIN) noDataVal_ = std::numeric_limits::max(); else - noDataVal_ = std::numeric_limits::min(); + noDataVal_ = -std::numeric_limits::max(); std::fill(vals_->begin(), vals_->end(), noDataVal_); // std::fill(counts_->begin(), counts_->end(), 0);