Repository navigation
fix(analysis): join layers with different source CRSs - #854
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Support joins with differing CRS metadata crates/analysis/src/tools.rs, docs/user-guide/analysis.md |
Spatial Join proceeds when the layers have different CRS metadata. Tests compare results with baseline joins and check output metadata. The user guide describes the supported coordinate systems. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
opengeos/RustGIS#851— This PR removes the Spatial Join rejection for layers with differing source CRSs and adds regression coverage.opengeos/RustGIS#748— This PR adds checks for Spatial Join fields and features, which relate to the issue’s request to test output geometry and attributes.
Suggested reviewers: quanguet0409
Merge Risk: 
Minimal · up to 93e04
-
The Spatial Join CRS behavior is consistent with the documented contract, with no identified merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "fix(analysis): join layers with different source CRSs" matches the main change. The raw summary shows spatial_join no longer rejects target and join layers with differing CRS metadata, and the user guide was updated to match. The title names the fix, the affected area (analysis), and the behavior change. It is specific and concise.
Full details: Description check
-
Explanation
The description follows the template. It has a Summary section that explains the change, why it is needed (Dataset geometry is already stored as lon/lat), and that the output retains the target's source CRS. It also covers the replaced rejection test and the user guide update. The Testing section lists the regression test before and after the fix, cargo xtask ci, pre-commit, and a wasm build. The Related issue section references
#851as a prerequisite and states that the new Spatial Join options are separate work. The template's required headings are all present and filled in.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit maps the meadow wide,
With lon and lat as paths to guide.
Two layers meet, though CRSs vary,
Their joined fields are checked with care.
The target’s CRS stays in its place,
Then hops away with measured grace.
Comment @coderabbitai help to get the list of available commands.
Code reviewI found no bugs, security issues or AGENTS.md violations in this PR. What changed: What I checked
Nits (low confidence, optional)
Change sizeCompared: the whole PR against main (merge base d76e1fc to PR head 93e0499).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
Spatial Join rejected layers with different source CRSs even though
Datasetgeometry is already stored in longitude/latitude. Remove that metadata comparison so, for example, a projected-source layer can join a longitude/latitude-source layer. The output retains the target's source CRS for export.Replace the rejection test with regression coverage for Intersects, Within and Contains, comparing geometry and joined attributes against the existing results. Update the user guide to explain that source CRSs may differ.
Testing
cargo xtask cipassed (fmt, workspace Clippy, workspace tests and layers; serial tests with relay isolation on this host).pre-commit run --all-filespassed.cargo build --locked --target wasm32-unknown-unknown -p rustgis-webpassed.Related issue
Prerequisite bug fix described in #851. The new Spatial Join options and merge rules remain separate work.
Summary by CodeRabbit