feat(sedona-raster-functions): add RS_Values#1027
Draft
james-willis wants to merge 3 commits into
Draft
Conversation
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.
…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.
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.
RS_Values(raster, points [, band]) -> List<Double>— the plural ofRS_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>):SedonaTypehas noList<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_Valuevia a newsamplingmodule rather than duplicated.