Skip to content

fix(deck.gl-raster): let FilterNoDataVal discard NaN pixels - #727

Merged
kylebarron merged 1 commit into
mainfrom
kyle/filter-nodata-nan
Oct 16, 2026
Merged

kylebarron merged 1 commit into
mainfrom
kyle/filter-nodata-nan

Conversation

@kylebarron

Copy link
Copy Markdown
Member

Note

This PR was written by Claude (Claude Code), not by @kylebarron.

FilterNoDataVal discarded pixels where color.r == nodata.value. That comparison is never true for NaN, so a NaN nodata value discarded nothing. The module now also discards the pixel when both the nodata value and the pixel are NaN, so { value: NaN } works, and the docstrings say so.

Checked in Chrome with the nldas-icechunk example, temporarily changed to turn its fill pixels into NaN and pass value: NaN. Before the change, the ocean was drawn in the colormap's lowest color; after it, the ocean is transparent. With the example unchanged, its numeric fill value is still discarded.

Closes #634

🤖 Written by Claude Code

FilterNoDataVal compared `color.r == nodata.value`, which is never true
for NaN, so a NaN nodata value discarded nothing. Also discard the pixel
when both the nodata value and the pixel are NaN.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the fix label Oct 16, 2026

@kylebarron kylebarron left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kylebarron
kylebarron merged commit e2f9942 into main Oct 16, 2026
3 checks passed
@kylebarron
kylebarron deleted the kyle/filter-nodata-nan branch October 16, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure the FilterNoDataVal GPU module can filter out NaN values

1 participant