Skip to content

feat(sedona-raster-functions): add RS_Values#1027

Draft
james-willis wants to merge 3 commits into
apache:mainfrom
james-willis:jw/rs-values
Draft

feat(sedona-raster-functions): add RS_Values#1027
james-willis wants to merge 3 commits into
apache:mainfrom
james-willis:jw/rs-values

Conversation

@james-willis

Copy link
Copy Markdown
Contributor

RS_Values(raster, points [, band]) -> List<Double> — the plural of RS_Value, sampling one pixel per point.

The points are carried as a MultiPoint (a bare Point is also accepted), diverging from Sedona's RS_Values(raster, Array<Geometry>): SedonaType has no List<geometry> representation, so the array-of-geometry signature would need new type-system plumbing. This keeps the first cut self-contained; the canonical signature can follow.

Sampling, CRS handling, and pixel decoding are shared with RS_Value via a new sampling module rather than duplicated.

RS_Values(raster, points [, band]) -> List<Double> samples one pixel per
sub-point of a MultiPoint (a bare Point is also accepted). Sampling, CRS
handling, and pixel decoding are shared with RS_Value via a new sampling
module rather than duplicated.
@github-actions github-actions Bot requested a review from zhangfengcdt July 7, 2026 00:01
…and rasters

Sampling with no band argument now defaults to band 1 only for a single-band
raster; on a multiband raster it errors instead of silently picking band 1,
matching RS_SetBandNoDataValue. The check lives in a shared sampling::default_band
helper used by both RS_Values and RS_Value (the latter a drive-by fix).

Test SQL folds the CRS into ST_GeomFromText/ST_Point rather than wrapping in
ST_SetCRS.
…icit band

The single-band-only default now errors on a multiband raster with no band,
which broke the multiband RS_Value doc example and the RS_Value benches (which
sample the 3-band benchmark raster). Pass an explicit band in the rs_value.qmd
example and the benches. Adds a ScalarArrayScalar benchmark variant so the
scalar-raster RS_Value bench can carry a band argument.
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