Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

projinfo: fix long option name --source-crs (fixes #3600) #3601

Merged
merged 1 commit into from
Feb 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apps/projinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions test/cli/testprojinfo
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion test/cli/testprojinfo_out.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-------------------------------------
Expand Down