3 # Test NTv2 (.gsb) support. Assumes ntv2_0.gsb is installed.
11 echo "Usage: ${0} <path to 'cs2cs' program>"
16 if test -z "${EXE}"; then
20 if test ! -x ${EXE}; then
21 echo "*** ERROR: Can not find '${EXE}' program!"
25 echo "============================================"
26 echo "Running ${0} using ${EXE}:"
27 echo "============================================"
32 echo "doing tests into file ${OUT}, please wait"
35 echo "##############################################################" >> ${OUT}
36 echo Point in the ONwinsor subgrid. >> ${OUT}
38 $EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb \
39 +to +proj=latlong +datum=NAD83 -E -w4 >>${OUT} <<EOF
40 82d00'00.000"W 42d00'00.000"N 0.0
41 82d00'01.000"W 42d00'00.000"N 0.0
42 82d00'02.000"W 42d00'00.000"N 0.0
43 84d00'00.000"W 42d00'00.000"N 0.0
46 echo "##############################################################" >> ${OUT}
47 echo Try with NTv2 and NTv1 together ... falls back to NTv1 >> ${OUT}
49 $EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv2_0.gsb,ntv1_can.dat,conus \
50 +to +proj=latlong +datum=NAD83 -E -w4 >>${OUT} <<EOF
51 99d00'00.000"W 65d00'00.000"N 0.0
52 111d00'00.000"W 46d00'00.000"N 0.0
53 111d00'00.000"W 47d30'00.000"N 0.0
56 ##############################################################################
58 # do 'diff' with distribution results
59 echo "diff ${OUT} with ${OUT}.dist"
60 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
61 if [ $? -ne 0 ] ; then
63 echo "PROBLEMS HAVE OCCURED"
64 echo "test file ${OUT} saved"
69 echo "test file ${OUT} removed"