diff --git a/CHANGELOG.md b/CHANGELOG.md index ea0cc582..c103e27a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -177,6 +177,11 @@ - Switch back to `.qgs` project file from `.qgz`; There is [an issue](https://github.com/qgis/QGIS/issues/42033) conveniently opening `.qgz` project files in OSX for some versions of QGIS `3.16.x`. +- Fix issue with "Geophysics/" layers displaying nodata values at some zoom + levels: + - "Bouguer gravity anomaly (2km)" + - "Faye (free-air) gravity anomaly (2km)" + - "Geoid model (2km)" # v2.0.0rc6 (2022-03-17) diff --git a/qgreenland/config/cfg-lock.json b/qgreenland/config/cfg-lock.json index 338030b3..a00a85a6 100644 --- a/qgreenland/config/cfg-lock.json +++ b/qgreenland/config/cfg-lock.json @@ -18394,6 +18394,8 @@ "EPSG:3413", "-r", "bilinear", + "-dstnodata", + "-9999", "-tr", "2000", "2000", @@ -18485,6 +18487,8 @@ "EPSG:3413", "-r", "bilinear", + "-dstnodata", + "-9999", "-tr", "2000", "2000", @@ -18576,6 +18580,8 @@ "EPSG:3413", "-r", "bilinear", + "-dstnodata", + "-9999", "-tr", "2000", "2000", diff --git a/qgreenland/config/helpers/layers/gravity_anomalies_geoid.py b/qgreenland/config/helpers/layers/gravity_anomalies_geoid.py index 5a1dcc04..321c1dcb 100644 --- a/qgreenland/config/helpers/layers/gravity_anomalies_geoid.py +++ b/qgreenland/config/helpers/layers/gravity_anomalies_geoid.py @@ -38,6 +38,12 @@ def _make_layer( input_file="{input_dir}/" + filename, output_file="{output_dir}/" + filename, reproject_args=[ + # The source nodata value is 1.70141e+38. This value is not + # correctly set in the overviews (added in the step below), + # so override it here as -9999. See + # https://github.com/OSGeo/gdal/issues/8187. + "-dstnodata", + "-9999", # Source data is 0.02x-0.02 degrees resolution. Rene noted in # his email to QGreenland on 2021-01-22 that the geoid and # gravity anomaly grids are 2km resolution.