Skip to content

feat(rust/sedona-raster): trinary Override for BandOverrides; copy_into stops composing views - #1158

Draft
james-willis wants to merge 3 commits into
mainfrom
jw/copy-into-override-semantics
Draft

feat(rust/sedona-raster): trinary Override for BandOverrides; copy_into stops composing views#1158
james-willis wants to merge 3 commits into
mainfrom
jw/copy-into-override-semantics

Conversation

@james-willis

Copy link
Copy Markdown
Contributor

No description provided.

…to stops composing views

Replace the all-Option BandOverrides fields with a trinary Override<T>
(Keep/Clear/Set) for the clearable fields (name, nodata, outdb_uri,
outdb_format, view); dim_names stays Option because a band always has dim
names, so there is no absent state for Clear to express. copy_into now
resolves each field by matching on the Override and never composes the
view: Keep inherits the source view, Clear resets to the canonical
identity view, and Set uses the given view verbatim. Callers that want
the old compose behaviour pass Set(&source.view().compose(&next)?).

RasterBuilder::with_view adopts this model: it composes the supplied
delta onto the input's own view itself and passes the absolute result as
Override::Set, inheriting nodata and the outdb hints from the input via
Override::Keep (a None override maps to Keep, an explicit value to Set).
This keeps both the source-nodata inheritance and the compose-time bound
against the parent's visible window that copy_into used to provide.
…a on null

A null nodata argument previously nulled the whole raster row. It now
flows through as None and clears the addressed band's nodata via
Override::Clear, rebuilding the raster with that band carrying no nodata
sentinel. A null raster or band still yields a null raster. set_band_nodata
takes Option<f64>; Some(v) sets Override::Set(packed bytes), None clears,
and other bands keep their own nodata (Override::Keep).
@github-actions
github-actions Bot requested a review from paleolimbot August 12, 2026 20:24
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.

1 participant