Skip to content

Commit bbc0aae

Browse files
authored
terrio-crs: ESRI:102151 and 102964 in the ESRI table (#1106)
* terrio-crs: ESRI:102151 and 102964, left out of the ESRI table when GDAL could not download their grids * ESRI PROJJSON corpus with ESRI:102151 and 102964 * gen_esri_table: pyproj's network off too; the wbprojection-fallback corpus differences with the two CRSs
1 parent 476b67d commit bbc0aae

12 files changed

Lines changed: 30 additions & 22 deletions
-59 Bytes
Binary file not shown.
280 Bytes
Binary file not shown.

‎crates/terrio-crs/src/catalog.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,11 @@ mod tests {
446446
assert_eq!(count("EPSG", Some(CrsKind::Vertical), None), 309);
447447
assert_eq!(count("EPSG", Some(CrsKind::Compound), None), 584);
448448
assert_eq!(count("EPSG", None, Some(true)), 530);
449-
// 2589 in the catalog, less those on projections terrio does not compute: Wagner VII,
449+
// 2591 in the catalog, less those on projections terrio does not compute: Wagner VII,
450450
// Compact Miller, Goode Homolosine Ocean, Peirce quincuncial and Spilhaus; and without
451451
// wbprojection, the 28 on Aitoff, the other Eckerts and other projections.
452452
let refused = if cfg!(feature = "wbprojection-fallback") { 9 } else { 37 };
453-
assert_eq!(count("ESRI", None, None), 2589 - refused);
453+
assert_eq!(count("ESRI", None, None), 2591 - refused);
454454
assert_eq!(count("IAU_2015", None, None), 2201);
455455
assert_eq!(count("IAU_2015", Some(CrsKind::Other), None), 12);
456456
// The default leaves deprecated CRSs out.

‎crates/terrio-crs/src/lib.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4425,9 +4425,9 @@ mod gdal_proj4_tests {
44254425
assert!(f[3].is_empty() || !proj.contains("+geoidgrids="), "{}:{code} {proj}", f[0]);
44264426
checked += 1;
44274427
}
4428-
// Two of PROJ 9.9.0's ESRI codes are not in terrio's ESRI table.
4429-
assert_eq!(skipped, ["ESRI:102151", "ESRI:102964"]);
4430-
assert_eq!(checked, 5128);
4428+
// Every one is in terrio's tables, ESRI:102151 and 102964 too.
4429+
assert!(skipped.is_empty(), "{skipped:?}");
4430+
assert_eq!(checked, 5130);
44314431
}
44324432

44334433
#[test]

‎crates/terrio-crs/tests/data/projjson_corpus_diffs.tsv‎

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

‎crates/terrio-crs/tests/data/projjson_corpus_diffs_fallback.tsv‎

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.
568 Bytes
Binary file not shown.

‎crates/terrio-crs/tests/gdal_proj4_export.rs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ fn registry_crss_are_written_as_gdal_exports_them() {
3131
compared += 1;
3232
}
3333
assert!(compared > 1250, "only {compared} compared");
34-
// The ESRI CRSs terrio does not carry: CRSs of other bodies, and ESRI:102151, which is not
35-
// in its ESRI table.
36-
let expected = ["ESRI:102151", "ESRI:103880", "ESRI:104902", "ESRI:104922", "ESRI:104942", "ESRI:104962", "ESRI:104982"];
34+
// The ESRI CRSs terrio does not carry: CRSs of other bodies.
35+
let expected = ["ESRI:103880", "ESRI:104902", "ESRI:104922", "ESRI:104942", "ESRI:104962", "ESRI:104982"];
3736
assert_eq!(unread, expected);
3837
}
3938

‎docs/crs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ listed.
438438
| Authority | Listed | Of which deprecated | Not listed (GDAL lists them) |
439439
|---|---:|---:|---|
440440
| EPSG | 7,961: 718 geographic 2D, 300 geographic 3D, 296 geocentric, 5,754 projected, 309 vertical, 584 compound | 530 | 16 engineering and other CRSs, 26 projected CRSs GDAL does not import (Qornoq 1927 Greenland zones...), and the deprecated EPSG:3752 (Mercator variant A with a latitude of origin, which PROJ neither writes as a PROJ string nor transforms) |
441-
| ESRI | 2,580: 323 geographic 2D, 14 geographic 3D, 2,243 projected | 1,338 | 272 vertical CRSs; 130 geographic and projected CRSs terrio's ESRI table leaves out (119 of other bodies than the Earth, and those PROJ does not transform from WGS 84); 37 on projections terrio does not compute without the `wbprojection-fallback` feature of `terrio-crs` (9 of them with it, Wagner VII, Compact Miller, Peirce quincuncial...) |
441+
| ESRI | 2,582: 323 geographic 2D, 14 geographic 3D, 2,245 projected | 1,339 | 272 vertical CRSs; 128 geographic and projected CRSs terrio's ESRI table leaves out (119 of other bodies than the Earth, and those PROJ does not transform from WGS 84); 37 on projections terrio does not compute without the `wbprojection-fallback` feature of `terrio-crs` (9 of them with it, Wagner VII, Compact Miller, Peirce quincuncial...) |
442442
| IAU_2015 | 2,201: 115 geographic 2D, 2,074 projected, 12 other | 0 | none |
443443

444444
The conformance suite `crs-list` (`scripts/compare_crs_list_with_gdal.py`) compares every listed

‎docs/testing.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,7 @@ cargo check -p terrio --target wasm32-unknown-unknown --no-default-features --fe
17841784

17851785
`projjson_corpus_epsg.jsonl.zst` and `projjson_corpus_esri.jsonl.zst` hold every CRS of terrio's EPSG table (geographic,
17861786
geocentric, projected, vertical and compound) and ESRI table, as PROJ 9.9.0
1787-
writes it in WKT 2 (`WKT2_2019`), GDAL WKT 1 and ESRI WKT 1: 30,932 texts, each
1787+
writes it in WKT 2 (`WKT2_2019`), GDAL WKT 1 and ESRI WKT 1: 30,938 texts, each
17881788
with the PROJJSON PROJ writes for it (pyproj 3.8.0, network off). The test reads
17891789
each text with `SpatialRef::from_wkt`, writes it with `to_projjson`, and compares
17901790
what the CRS is field by field: types, the IDs and names of CRSs, the names and
@@ -2057,7 +2057,7 @@ The PROJ string GDAL exports (`SpatialRef::to_proj4_gdal`) is compared with GDAL
20572057
9.9.0 (`OSRExportToProj4`, `OSR_USE_NON_DEPRECATED=NO`, network off), character for character. The
20582058
fixture holds GDAL's string of 1,298 EPSG and ESRI codes (every fifth of the 5,130 GDAL adds a
20592059
`+towgs84` or geoid model to, every twentieth other one and those RustGIS named); all are compared
2060-
but the 7 ESRI codes terrio does not carry, which the test lists. A second fixture holds 13 of them
2060+
but the 6 ESRI codes terrio does not carry, which the test lists. A second fixture holds 13 of them
20612061
given as GDAL's WKT 1 and WKT 2, the WKT 1 without its root identifier or with a datum shift of its
20622062
own, ESRI's WKT and the PROJ string (76 cases); all are compared but 7 listed compound-CRS cases,
20632063
which must still give a string (`cargo test -p terrio-crs --test gdal_proj4_export`; regenerate the

0 commit comments

Comments
 (0)