feat(rust/sedona-raster): trinary Override for BandOverrides; copy_into stops composing views - #1158
Draft
james-willis wants to merge 3 commits into
Draft
feat(rust/sedona-raster): trinary Override for BandOverrides; copy_into stops composing views#1158james-willis wants to merge 3 commits into
james-willis wants to merge 3 commits into
Conversation
…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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.