Repository navigation
fix(geom): reject invalid world projection radii - #2038
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewReviewed Bugs: None found. Checked:
Security: None. The change is pure Performance: None meaningful. Each Quality (nit, low priority): The radius guard is copied verbatim into AGENTS.md: Compliant on what I could check by reading. No Prior concerns: 0 earlier review threads exist on this PR, so none were left alone. Change sizeCompared: the whole PR against main (merge base 3da536e to PR head 6ba2530).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
…on terrio-crs) opengeos#2038 refused a radius that isn't finite and positive in RustGIS's own world projections, which this branch hands to terrio-crs. The same check is kept as a test of the terrio-crs path.
Summary
World::forwardandWorld::inversenow returnNonewhen the sphere radius is zero, negative, NaN or infinite. Previously a zero radius could collapse a forward projection onto its false origin, a negative radius could mirror coordinates, and an infinite radius could turn a finite inverse input into an apparently valid centre point.Both directions validate the radius before projection arithmetic. The method documentation states that the radius must be finite and positive. Valid projection formulas and the public API signatures are unchanged.
This addresses only the
Worldsphere-radius validation finding in #2008, section 4. The Aeqd and UTF-8 label-length findings in that bullet remain open, as does the rest of the audit. No dependencies or data-model changes; no other project's code was followed or copied.Testing
cargo test -p rustgis-geom world::tests: 5 passed.cargo xtask ci: passed (fmt, Clippy with-D warnings, workspace tests: 6,461 passed / 23 ignored, layers).pre-commit run --all-files: all hooks passed.cargo check --locked --target wasm32-unknown-unknown -p rustgis-geom: passed.UI evidence
No visible UI change.
Related issue
Part of #2008 (section 4:
Worldradius validation). Does not close the tracking issue.Summary by CodeRabbit