Repository navigation
feat: add compare, pixel-info and xyz raster query commands - #303
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Walkthrough
Merge Risk:
|
Code reviewI read the CLI Bugs
Security
Performance
Quality
CLAUDE.md (AGENTS.md)
Change sizeCompared: the whole PR against main (merge base 5f4a527 to PR head a55773e)
Sizes use 1 KB = 1024 B. The table above lists the 20 largest changes (the full PR touches 26 files). |
Code reviewThis is a partial review. I read Bugs
Security
Performance
Quality
CLAUDE.md
Change sizeCompared: the whole PR against main (merge base 5f4a527 to PR head 5dd9566).
|
Code reviewI read Bugs
Security
Performance
Quality
CLAUDE.md (AGENTS.md)
Change sizeThe whole PR against main (merge base 2d71f94 to PR head 8f47068).
|
Code reviewI reviewed the new Bugs
Security
Performance
Quality
CLAUDE.md
Change sizeCompared: the whole PR against main (merge base 7e33dd7 to PR head b379e56).
|
Code reviewThis was a partial review. I read Bugs
Security
Performance
Quality
CLAUDE.md (AGENTS.md)
Change sizeCompared: the whole PR against main (merge base 7e33dd7 to PR head 3072a01)
|
|
@coderabbitai Please review the latest changes and approve this PR once your actionable findings are addressed. I am continuing to resolve the remaining review comments and CI failures. |
|
|
Code reviewI read the full diff (5,761 lines) and the core paths in Bugs
Security
Performance
Quality
CLAUDE.md / AGENTS.md
Change sizeCompared: the whole PR against main (merge base 43b241c to PR head 07f4b28).
Sizes are file sizes from |
|
@coderabbitai approve The latest six review threads are addressed with verified attribution, typing/docs fixes and explicit rationale. The real mask-report mismatch remains a documented difference; strict conformance intentionally reports it. Current head 05aaa76. Please approve if no functional blockers remain. |
|
@giswqs I’m requesting approval based on your update for 🧠 Learnings used
✅ Action performed
|
Code reviewBugs
Security
Performance
Quality
CLAUDE.md / AGENTS.md
Change sizeCompared: the whole PR against main (merge base 43b241c to PR head 05aaa76).
|
|
@coderabbitai approve The latest eight review threads are addressed with verified attribution, typing/docs fixes and explicit rationale. The real mask-report mismatch remains a documented difference; strict conformance intentionally reports it. Current head 6a244d9. Please approve if no functional blockers remain. |
|
@giswqs I’m requesting approval based on your update for 🧠 Learnings used
✅ Action performed
|
Code reviewI read the full diff (33 files) and the surrounding sources for compare, pixel-info, xyz, the MCP exit-code path, and the Python and JS bindings. I found no correctness bugs I could confirm by reading. The main concern is duplicated logic that AGENTS.md asks bindings to avoid. I could not build or run the tests here. Bugs
Security
Performance
Quality
CLAUDE.md
Change sizeCompared: the whole PR against main (merge base 43b241c to PR head 6a244d9).
The table lists the top 10 of 19 entries in |
Adds raster comparison, pixel queries and XYZ export through shared Rust algorithms, CLI/MCP, Python and JavaScript/WebAssembly. Part of #289.
Behavior
comparefollows GDAL report ordering and skip options, returns a difference count, and exposes per-band/overview/mask counts and maximum errors in JSON. Binary reads stream in chunks; read failures propagate as errors. Pixel comparisons use shared block-aligned strips. Comparison-only TIFF metadata is fetched separately from ordinary lazy opens.pixel-infoaccepts positions or vector points/centroids, CRS selection, overviews, four interpolation methods, field selection and GeoJSON/CSV/text/value/JSON or native vector-file output. CLI-o -writes text to stdout. Invalid Python output options fail before reads/writes; ambiguous vector output field collisions fail before writing.xyzstreams selected pixels/bands, windows, skips, nodata replacement and text delimiters in native Rust/CLI. It rejects non-finite nodata that cannot be converted into the first selected integer working type, matching GDAL's conversion failure. JavaScript returns a complete string; its comparisons reuse each copied input buffer.Validation
Tested in a local environment with GDAL 3.13.3. Validation covers the 606-test core integration suite, 16 MCP tests, five CLI tests, 18 Python query/dataset tests and three release-WASM/Node tests. Final diagnostic changes pass 14 focused Rust tests, five CLI tests, eight Python query tests and the current release-WASM query test. Optimized CLI builds, typing/stubtest, workspace Clippy and changed-file pre-commit pass.
The registered
raster-queryscript compares real USGS, Landsat, OPERA, ECOSTRESS, NLCD and netCDF inputs and derived copies: 100 cases, 96 exact, three within documented numeric tolerances, and one known internal-mask report difference. XYZ has 11 byte-identical text cases plus a shared refusal of non-finite integer nodata. Pixel-info has 64 exact and three within 4e-14 relative/one ULP. Compare has 20 exact report/exit-status cases and the known mask-report difference: GDAL's report says 1,863,354 per band; its direct mask reads and Terrio count 2,568,634. This difference is retained explicitly, not treated as exact agreement.Regressions cover truncated HTTP reads in either comparison operand, CRS-less position layers, reserved properties/vector field collisions, integer GeoJSON interpolation, literal marker strings, invalid output options, stdout output and single extraction of each WASM input buffer. GDAL 3.13.3 directly confirms the CRS-less pixel default, copied GeoJSON property precedence and integer raw/unscaled interpolation behavior.
I/O evidence
A before/after local HTTP range-server probe on real
cog.tif(610,612 bytes) records one request/65,536 served body bytes for ordinary lazy info, four requests/1,221,224 bytes for comparing two URLs, and two requests/610,612 bytes for XYZ skip 3. Counts and outputs are unchanged on this fixture. Earlier 51 MB USGS measurements remain documented: two cubic queries read 1.8 MB in three requests; a bounded XYZ window reads 0.9 MB in two requests.Scope and limits
CSV comparisons retain the original numeric precision: no geometry-coordinate rounding precedes exact/tolerance classification. The 67-case pixel-info rerun still gives 64 exact and three within tolerance. Input transformation failure is intentionally fatal, matching a direct GDAL 3.13.3 projected-raster probe. Diagnostic JSON uses null for non-finite numbers; GDAL-compatible GeoJSON retains its non-standard tokens, and text labels non-finite locations explicitly.
Summary by CodeRabbit