Skip to content

Commit e1b006e

Browse files
committed
Fix unreleased regression related to 78d563c, that caused GDAL's test_gdalwarp_lib_135 test to fail
1 parent 03fac0e commit e1b006e

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/iso19111/operation/singleoperation.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ bool CoordinateOperation::isPROJInstantiable(
297297
}
298298
for (const auto &gridDesc :
299299
gridsNeeded(databaseContext, considerKnownGridsAsAvailable)) {
300-
if (!gridDesc.available) {
300+
// Grid name starting with @ are considered as optional.
301+
if (!gridDesc.available &&
302+
(gridDesc.shortName.empty() || gridDesc.shortName[0] != '@')) {
301303
return false;
302304
}
303305
}

test/cli/testvarious

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,13 @@ echo 39 -3 0 | PROJ_DISPLAY_PROGRAM_NAME=NO PROJ_DATA=tmp_dir PROJ_DEBUG=2 $EXE
12471247

12481248
rm -rf tmp_dir
12491249

1250+
echo "##############################################################" >> ${OUT}
1251+
echo "Test cs2cs grid missing with @gridname" >> ${OUT}
1252+
1253+
$EXE +proj=longlat +datum=WGS84 +units=m +geoidgrids=@i_dont_exist.tif +vunits=m +no_defs +type=crs +to EPSG:4979 >> ${OUT} <<EOF
1254+
2 49 0
1255+
EOF
1256+
12501257
echo "##############################################################" >> ${OUT}
12511258
echo "Test Similarity Transformation (example from EPSG Guidance Note 7.2)" >> ${OUT}
12521259
#

test/cli/tv_out.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,9 @@ cannot initialize transformation
607607
cause: File not found or invalid
608608
program abnormally terminated
609609
##############################################################
610+
Test cs2cs grid missing with @gridname
611+
49dN 2dE 0.000
612+
##############################################################
610613
Test Similarity Transformation (example from EPSG Guidance Note 7.2)
611614
300000 4500000 299905.060 4499796.515 0.000
612615
##############################################################

0 commit comments

Comments
 (0)