Repository navigation
build(deps): terrio-crs 0.3.0 from crates.io instead of the git pin - #2933
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| // Away from the equator, where Web Mercator's sphere and an ellipsoid's Mercator (World | ||
| // Mercator, or GDAL 1's EPSG:900913 without its `PROJ4` extension, as PROJ reads it) are | ||
| // 21 km apart at 45°; at the origin they meet. | ||
| Crs::WebMercator => Some(rustgis_geom::Coord::new(10.0, 45.0)), |
There was a problem hiding this comment.
This new comparison is only reached when the file gives a shift. read_root (line 500, unchanged) returns by_code straight away when files_shift.is_none(), so a GDAL 1 EPSG:900913 WKT whose datum has no TOWGS84 clause still reads as Crs::WebMercator, the sphere, about 21 km off at 45°N. The PR body calls the no-shift case "wrong all along", so this looks like the case it means to fix. The new tests only cover a datum with TOWGS84[0,0,0,0,0,0,0], so they would not catch it. I have not run this. Suggested fix: add a regression test with a 900913 WKT that has no TOWGS84. If it reads as Web Mercator, run places_as for Crs::WebMercator even when there is no shift.
Confidence: medium (about 60%).
Category: bug
There was a problem hiding this comment.
Fixed in #2961: a Web Mercator code without a TOWGS84 now goes through places_as too, so the 900913 text without its PROJ4 extension and without a shift reads as ellipsoidal Mercator (PROJ 9.9.0: 60°E 45.1923152°N), with a test for it.
| // "EPSG:4326", always_xy=True).transform(500000, 5000000)` is 3°E 45.1534772°N), as | ||
| // EPSG:32631 does. | ||
| let shifted = crs_from_wkt(&towgs84("TOWGS84[1,2,3]")); | ||
| assert_eq!(shifted, Ok(Crs::Epsg(32631))); |
There was a problem hiding this comment.
The UTM text with TOWGS84[1,2,3] now reads as Crs::Epsg(32631), which drops the file's shift with no note. Before this PR the same text read as Crs::Custom and kept its shift. PROJ 9.9.0 ignores that shift on WGS 84, so the positions match PROJ. AGENTS.md still says a reader that drops a value must say what it dropped. This test uses crs_from_wkt, which discards the note, so it can't check that. Suggested fix: have the places_as path (read_root, around line 501) say the file's shift on WGS 84 is set aside because WGS 84 has none, and assert that note with read_wkt here.
Confidence: about 50%. I have not run the code.
Category: agents-md
There was a problem hiding this comment.
Fixed in #2961: the shift set aside on a code without one is said ("the file's own shift to WGS 84 is set aside, as EPSG:32631 has none, as in PROJ"), asserted through read_wkt; the stale comment and the 9.8.1 citation are updated there too.
Code reviewReviewed the whole diff: the terrio-crs 0.3.0 registry move, the lock files, the license notices, and Bugs
Security
Performance
Quality
AGENTS.md
Not verified: the Change sizeCompared with main (merge base 7f46f28 to PR head ffc1852). The sizes are whole-file sizes, not line counts.
|
📖 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 |
Refs #2032
RustGIS has taken terrio-crs from a git pin of opengeos/terrio (rev
bbc0aae) since A1 (#2041), waiting for a release. terrio-crs 0.3.0 (terrio v0.10.0) is that release, and it contains the pinned rev. This PR moves to it.What changes
Cargo.tomlnow hasterrio-crs = { version = "0.3.0", default-features = false }.deny.tomlandfuzz/deny.tomlallow no git source again, as before the pin.Cargo.lockandfuzz/Cargo.lockmove to the registry crate.fuzz/Cargo.lockwas already behind main's manifests and is refreshed with it.cargo xtask noticesregenerated the threeTHIRD-PARTY-LICENSES.txtfiles.TOWGS84[1,2,3]on WGS 84 itself: read as EPSG:32631, as PROJ transforms it, with no shift.PROJ4extension: this one exposed a RustGIS bug.places_asdecides whether a file reads as its EPSG code. It compared Web Mercator at 0°/0°, where Web Mercator's sphere and Mercator on the WGS 84 ellipsoid coincide.Checked against PROJ 9.9.0
The oracle is conda-forge PROJ 9.9.0 with pyproj 3.8.0 built against it, network off:
Transformer.from_crs(CRS.from_wkt(text), "EPSG:4326", always_xy=True).TOWGS84[1,2,3]: 500 000 m E, 5 000 000 m N is 3°E 45.1534772°N, the same as EPSG:32631.The tests assert both.
Surfaces
Every surface reads
.prj, GeoTIFF and typed WKT through the same reader: desktop, web, CLI, Python and the Assistant. No command, schema or user guide changes.Tests
Local CI passes: fmt, clippy, the workspace tests, the layers extra, the schema check, notices, the wasm build and
cargo deny. The exceptions are the four tests that fail only on my machine (three Shapefile tests and the GDAL-folder reload), which fail on main too.Summary by CodeRabbit