Skip to content

test(integration): RS_ReprojectMatch parity between SedonaDB and Sedona Spark - #1234

Merged
james-willis merged 3 commits into
apache:mainfrom
james-willis:jw/parity-reprojectmatch
Sep 4, 2026
Merged

test(integration): RS_ReprojectMatch parity between SedonaDB and Sedona Spark#1234
james-willis merged 3 commits into
apache:mainfrom
james-willis:jw/parity-reprojectmatch

Conversation

@james-willis

Copy link
Copy Markdown
Contributor

Parity coverage for RS_ReprojectMatch, probe-first, one module per function. Branches off main, independent of the other open parity PRs.

What agrees (4 passing tests)

The nearest-neighbour path is bit-for-bit identical everywhere probed:

  • Same-CRS regrid onto a finer reference (2-arg form, default NearestNeighbor) — anchored: extent-preserving doubling is pure block replication, source nodata carried through.
  • Same-CRS regrid onto a larger reference — anchored with a hand-computed regrid: nearest picks the source pixel under each output centre, and cells outside the source footprint fill with the input band's nodata.
  • A genuine cross-CRS warp (EPSG:4326 → EPSG:3857, 3-arg NearestNeighbor) — parity-only (warped picks aren't hand-computable; SedonaDB's own correctness is rasterio-oracled in python/sedonadb/tests), and the engines matched exactly.
  • CRS-less inputs — neither engine demands a CRS; anchored like the finer-grid case.

What diverges (2 xfails, both already cataloged for RS_Resample)

  • Bilinear: both engines really interpolate, but GDAL's kernel and the JVM's differ pixel-wise.
  • Unknown algorithm name: SedonaDB rejects 'sinc'; Sedona Spark silently resamples nearest.

Verification

4 passed, 2 xfailed locally (pyspark 4.0.4, Sedona 1.9.1); CI runs the parity lane on this branch.

…na Spark

The nearest-neighbour path agrees bit-for-bit everywhere probed: same-CRS
regrids onto finer and larger reference grids (anchored — nearest picks
the source pixel under each output centre, uncovered cells fill with the
input band's nodata), a genuine EPSG:4326 -> EPSG:3857 warp, and CRS-less
inputs. Two xfails, both the divergence family RS_Resample catalogs:
Bilinear kernels differ (GDAL vs the JVM), and Sedona Spark silently
resamples nearest for unknown algorithm names where SedonaDB rejects
them.
Drop the path_writer callbacks (_register/_add_view and their lambdas)
for the suite's plain idiom — write the GeoTIFFs inline and loop the
engines — and hoist the transform_bounds import to module level (the
parity suite hard-requires rasterio).
@james-willis
james-willis marked this pull request as ready for review September 4, 2026 20:36
@james-willis
james-willis merged commit 998d964 into apache:main Sep 4, 2026
5 checks passed
@james-willis
james-willis deleted the jw/parity-reprojectmatch branch September 4, 2026 20:48
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.

2 participants