Skip to content

feat: improve nodata and dtype handling#63

Merged
hrodmn merged 5 commits into
mainfrom
feat/nodata-dtype
May 26, 2026
Merged

feat: improve nodata and dtype handling#63
hrodmn merged 5 commits into
mainfrom
feat/nodata-dtype

Conversation

@hrodmn
Copy link
Copy Markdown
Collaborator

@hrodmn hrodmn commented May 26, 2026

This PR ensures that the correct dtype and nodata are maintained in the array's encoding and metadata attributes. If not provided by the user, dtype and nodata are inferred from the assets in a sample STAC item and are validated at runtime when each file is opened.

This also fixes a bug in the mosaic operations where nodata pixels were auto-filled with zeros by the MosaicMethod.

@hrodmn hrodmn linked an issue May 26, 2026 that may be closed by this pull request
@github-actions github-actions Bot added the feat label May 26, 2026
@github-actions
Copy link
Copy Markdown

Benchmark Comparison

Test Baseline (ms) PR (ms) Change
test_band_access_pattern[multi_band] 1312.7 825.1 -37.1%
test_band_access_pattern[single_band] 1216.9 774.8 -36.3%
test_full_compute 634.0 399.0 -37.1%
test_mosaic_method[first] 633.0 385.2 -39.1%
test_mosaic_method[median] 667.8 406.1 -39.2%
test_native_crs_resolution 11637.0 6653.0 -42.8%
test_open_overhead 282.5 160.1 -43.3%
test_reproject_workers[1] 2546.5 1587.1 -37.7%
test_reproject_workers[4] 1322.6 860.5 -34.9%
test_time_step_parallelism[dask_time_1] 1339.2 830.0 -38.0%
test_time_step_parallelism[no_dask] 931.6 581.1 -37.6%

@hrodmn hrodmn merged commit 4dbd618 into main May 26, 2026
6 checks passed
@hrodmn hrodmn deleted the feat/nodata-dtype branch May 26, 2026 17:20
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.

Nodata values encoded in xarray?

1 participant