test(integration): RS_Resample parity between SedonaDB and Sedona Spark - #1213
Closed
james-willis wants to merge 3 commits into
Closed
test(integration): RS_Resample parity between SedonaDB and Sedona Spark#1213james-willis wants to merge 3 commits into
james-willis wants to merge 3 commits into
Conversation
The nearest-neighbour path agrees bit-for-bit across dimension mode, scale mode (including grown-extent border fill), and the reference-raster and grid-snap overloads; those cases are locked with hand-computed expected= anchors. Interpolating algorithms diverge: Sedona Spark really implements only NearestNeighbor, Bilinear, and Bicubic, silently resampling nearest for every other name it accepts, and even the shared Bilinear/Bicubic kernels differ pixel-wise from GDAL's. Divergences are xfail-cataloged. 13 passing tests, 12 xfails. RS_MapAlgebra is out of scope (SedonaDB does not implement it).
With DecodedRaster's bbox construction (#1211), every extent-preserving resample anchors on the fixture's own BBOX, and the grown/snapped grids state their extents readably instead of as transform tuples.
Contributor
Author
|
Re-raised from the fork as #1219 (contributor branches shouldn't live in the Apache repo). Same commits; the apache branch is deleted. |
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.
Stacked on #1211 → #1212. Based on #1212's branch (
jw/compare-expected), so this diff shows only the new resample module; merge those first.The next step of the parity roadmap from #1203/#1212: RS_Resample, probed first on both engines, then locked in with anchored
compare()calls where agreement holds andxfail-cataloged where it doesn't. RS_MapAlgebra is out of scope (SedonaDB doesn't implement it; the roadmap docstring is updated accordingly).What agrees (13 passing tests, all anchored)
The nearest-neighbour path is bit-for-bit identical across every overload:
ceil(extent/pixel)output, border filled with band nodata or 0 when absent (both engines share the 0-fill convention).pytest.raises).Nearest resampling on the seeded grid is hand-computable (block replication up, centre-rule decimation down), so every passing test states its exact expected
DecodedRaster— no vacuous agreement.What diverges (12 xfails)
'sinc'; Spark silently resamples nearest.Verification
34 passed, 25 xfailedlocally (pyspark 4.0.4, Sedona 1.9.1) — the module adds 13 passed / 12 xfailed to test(integration): compare() accepts an optional expected anchor #1212's 21/13, and every xfail was probe-confirmed to actually trip.