From 504368988ef35d0670a32c02b5a3448f06b87ae7 Mon Sep 17 00:00:00 2001 From: Andrew Kirmse Date: Mon, 8 Jul 2024 07:37:55 -0700 Subject: [PATCH] Update FABDEM nodata value. --- code/fabdem_loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/fabdem_loader.cpp b/code/fabdem_loader.cpp index c4a1877..71cf7b7 100644 --- a/code/fabdem_loader.cpp +++ b/code/fabdem_loader.cpp @@ -34,7 +34,7 @@ using std::string; -static const float COPERNICUS_NODATA_ELEVATION = -32767.0f; +static const float FABDEM_NODATA_ELEVATION = -9999.0f; Tile *FabdemLoader::loadTile(const std::string &directory, double minLat, double minLng) { char buf[100]; @@ -78,11 +78,11 @@ Tile *FabdemLoader::loadTile(const std::string &directory, double minLat, double // Some source data appears to be corrupt if (isnan(sample)) { VLOG(1) << "Got NaN pixel at " << i << " " << j; - sample = COPERNICUS_NODATA_ELEVATION; + sample = FABDEM_NODATA_ELEVATION; } // Convert Copernicus NODATA to our NODATA - if (fabs(sample - COPERNICUS_NODATA_ELEVATION) < 0.01) { + if (fabs(sample - FABDEM_NODATA_ELEVATION) < 0.01) { inbuf[index] = Tile::NODATA_ELEVATION; } else { inbuf[index] = sample;