gdal: fix tests with PROJ 9.9.0

This commit is contained in:
Robert Schütz
2026-09-17 10:16:48 -07:00
parent 8c86087378
commit 2bc18d8892
2 changed files with 34 additions and 0 deletions

View File

@@ -92,6 +92,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-8rTCv0Nsb+BhRypwXDY5SWP7Bo1vqJBlm7y6YCOMa2M=";
};
patches = [
# https://github.com/OSGeo/gdal/pull/15259
./proj-9.9.0-compat.patch
];
nativeBuildInputs = [
bison
cmake

View File

@@ -0,0 +1,29 @@
diff --git a/autotest/utilities/test_gdalalg_mdim_info.py b/autotest/utilities/test_gdalalg_mdim_info.py
index 33b87f60fc..63c283b350 100755
--- a/autotest/utilities/test_gdalalg_mdim_info.py
+++ b/autotest/utilities/test_gdalalg_mdim_info.py
@@ -180,7 +180,14 @@ def test_gdalalg_mdim_info_all_options():
def test_gdalalg_mdim_info_binary(gdal_path):
out = gdaltest.runexternal(f"{gdal_path} mdim info ../gdrivers/data/netcdf/byte.nc")
- assert json.loads(out) == {
+
+ info = json.loads(out)
+
+ # make PROJ 9.9.0 output equivalent to previous versions (#15250)
+ srs = info["arrays"]["Band1"]["srs"]
+ srs["wkt"] = srs["wkt"].replace("(E)", "easting").replace("(N)", "northing")
+
+ expected = {
"arrays": {
"Band1": {
"attributes": {
@@ -313,6 +320,8 @@ def test_gdalalg_mdim_info_binary(gdal_path):
"type": "group",
}
+ assert info == expected
+
def test_gdalalg_mdim_info_completion_array_invalid_ds(gdal_path):