From 8c9cafc14fa65dd3853db3c3d9bf9f80188a825c Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 2 Feb 2023 22:05:40 +0100 Subject: [PATCH] projinfo: fix long option name --source-crs (fixes #3600) spotted by @santidhammo --- src/apps/projinfo.cpp | 2 +- test/cli/testprojinfo | 4 ++-- test/cli/testprojinfo_out.dist | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp index d4b0ea54f1..c8cf3102d9 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -1190,7 +1190,7 @@ int main(int argc, char **argv) { << std::endl; usage(); } - } else if ((arg == "-s" || arg == "--ssource-crs") && i + 1 < argc) { + } else if ((arg == "-s" || arg == "--source-crs") && i + 1 < argc) { i++; sourceCRSStr = argv[i]; } else if ((arg == "-t" || arg == "--target-crs") && i + 1 < argc) { diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index f5ccdf5596..509099e66f 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -62,8 +62,8 @@ echo "Testing projinfo -s EPSG:4326 -t EPSG:32631 --single-line" >> ${OUT} $EXE -s EPSG:4326 -t EPSG:32631 --single-line >>${OUT} echo "" >>${OUT} -echo "Testing projinfo -s NAD27 -t NAD83" >> ${OUT} -$EXE -s NAD27 -t NAD83 >>${OUT} +echo "Testing projinfo --source-crs NAD27 --target-crs NAD83" >> ${OUT} +$EXE --source-crs NAD27 --target-crs NAD83 >>${OUT} echo "" >>${OUT} echo "Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary --hide-ballpark" >> ${OUT} diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 32f2c1cc24..fe0d303055 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -294,7 +294,7 @@ PROJ string: WKT2:2019 string: CONVERSION["UTM zone 31N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]],ID["EPSG",16031]] -Testing projinfo -s NAD27 -t NAD83 +Testing projinfo --source-crs NAD27 --target-crs NAD83 Candidate operations found: 1 Note: using '--spatial-test intersects' would bring more results (10) -------------------------------------