feat(rust/sedona-raster-functions): add RS_Value#974
Draft
james-willis wants to merge 3 commits into
Draft
Conversation
Add RS_Value to sample a raster pixel value at a point or 1-based grid cell (2-D). Reads materialised InDb pixel bytes directly from the band's NdBuffer via stride-offset math and marks the UDF needs_pixels so the planner injects RS_EnsureLoaded — no GDAL dependency. Returns null for out-of-bounds locations and nodata pixels; errors on non-2-D bands.
Add RS_Value cases (grid, point, and point+band) to the consolidated native-raster-functions Criterion bench, alongside the other RS_* kernels.
…d band handling - Floor (not truncate toward zero) the inverse transform so a point just outside the top/left edge is out of bounds rather than sampling an edge pixel. - Require a 2-D spatial (y, x) band via is_spatial_2d, not any two-axis band. - Propagate a NULL band argument to a NULL result; reject band 0/negative rather than coercing to band 1. - Document why the pixel read uses the lossless f64 conversion. - Add tests: floor edge case, NaN nodata, band 0, and the point CRS-mismatch / non-point-geometry error paths.
47d859b to
82b7968
Compare
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.