From 23bf8bf5977073a91353f992ee0dd608be1d45fe Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 1 Dec 2018 17:57:32 +0100 Subject: Rename test/old/ to test/cli/ to better reflect their nature --- test/cli/testntv2 | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 test/cli/testntv2 (limited to 'test/cli/testntv2') diff --git a/test/cli/testntv2 b/test/cli/testntv2 new file mode 100755 index 00000000..e82026fc --- /dev/null +++ b/test/cli/testntv2 @@ -0,0 +1,75 @@ +: +# +# Test NTv2 (.gsb) support. Assumes ntv2_0.gsb is installed. +# +# +TEST_CLI_DIR=`dirname $0` +DATA_DIR=`dirname $0`/../../data +EXE=$1 + +usage() +{ + echo "Usage: ${0} " + echo + exit 1 +} + +if test -z "${EXE}"; then + EXE=../../src/cs2cs +fi + +if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + +OUT=ntv2_out +#EXE=../src/cs2cs +# +echo "doing tests into file ${OUT}, please wait" +rm -f ${OUT} +# +echo "##############################################################" >> ${OUT} +echo Point in the ONwinsor subgrid. >> ${OUT} +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb \ + +to +proj=latlong +datum=NAD83 -E -w4 >>${OUT} <> ${OUT} +echo Try with NTv2 and NTv1 together ... falls back to NTv1 >> ${OUT} +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb,ntv1_can.dat,conus \ + +to +proj=latlong +datum=NAD83 -E -w4 >>${OUT} <