Skip to content

Ensure floating point rasters have nodata set to NaN#159

Merged
vnewey merged 2 commits intodevelopfrom
set_nodata_nan
Mar 23, 2026
Merged

Ensure floating point rasters have nodata set to NaN#159
vnewey merged 2 commits intodevelopfrom
set_nodata_nan

Conversation

@robbibt
Copy link
Copy Markdown
Member

@robbibt robbibt commented Mar 23, 2026

During 2026 annual product runs, we noticed an issue where output DEA Intertidal floating point rasters (e.g. elevation were missing the NoData Value=nan COG metadata tag. This meant that downstream workflows like COG mosaicking could not pick up the correct metadata value, and instead assigned 0 values outside the raster:

image

gdalinfo on '/vsicurl/https://data.dea.ga.gov.au/derivative/ga_s2ls_intertidal_cyear_3/2-0-0/x090/y100/2022--P1Y/ga_s2ls_intertidal_cyear_3_x090y100_2022--P1Y_final_elevation.tif':

Band 1 Block=512x512 Type=Float32, ColorInterp=Gray 
NoData Value=nan 
Overviews: 1600x1600, 800x800, 400x400, 200x200, 100x100

gdalinfo on '/vsicurl/https://data.dev.dea.ga.gov.au/derivative/ga_s2ls_intertidal_cyear_3/2-5-0/x090/y103/2022--P1Y/ga_s2ls_intertidal_cyear_3_x090y103_2022--P1Y_final_elevation.tif':

Band 1 Block=512x512 Type=Float32, ColorInterp=Gray 
Overviews: 1600x1600, 800x800, 400x400, 200x200, 100x100

This PR temporarily fixes this by ensuring that any output float data has nodata attributes manually set on the xarray prior to the data being written to COG.

@robbibt robbibt requested a review from vnewey March 23, 2026 06:25
@github-actions
Copy link
Copy Markdown

For full integration test results, refer to the Tests directory README.

@vnewey vnewey merged commit 4d68ff1 into develop Mar 23, 2026
@vnewey vnewey deleted the set_nodata_nan branch March 23, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants