From 02f9a4cb891cbc7fb576cc38047ea4c0f6566f3c Mon Sep 17 00:00:00 2001 From: Vincent Varoquaux Date: Fri, 26 Jan 2024 10:27:46 +0100 Subject: [PATCH] fix: NoData=Nan does not work as expected --- docs/about/release-notes.md | 1 + internal/image/image.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index e6232e48..430fdf8d 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -39,6 +39,7 @@ - reindex dataset crossing antemeridian - Not empty image are returned as empty - Consolidation: BuildOverviews fails if GDAL raises a warning +- Consolidation: NoData=Nan does not work as expected ### Others diff --git a/internal/image/image.go b/internal/image/image.go index 01faf697..8b4e2988 100644 --- a/internal/image/image.go +++ b/internal/image/image.go @@ -277,6 +277,8 @@ func warpDatasetOptions(wktCRS string, transform *affine.Affine, width, height f if commonDFormat.NoDataDefined() { options = append(options, "-dstnodata", toS(commonDFormat.NoData)) + } else { + options = append(options, "-dstnodata", "None") } if transform != nil {