2
# Script to do some testing of various transformations depending on datum
3
# files that are not always available.
10
echo "Usage: ${0} <path to 'cs2cs' program>"
15
if test -z "${EXE}"; then
16
echo "*** ERROR: Missing path to 'cs2cs' program."
19
if test ! -x ${EXE}; then
20
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 1st through ntv1, 2nd through conus >> ${OUT}
38
$EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv1_can.dat,conus \
39
+to +proj=latlong +datum=NAD83 \
41
111d00'00.000"W 44d00'00.000"N 0.0
42
111d00'00.000"W 39d00'00.000"N 0.0
45
echo "##############################################################" >> ${OUT}
46
echo As above, but without ntv1 everything goes through conus file. >> ${OUT}
48
$EXE +proj=latlong +ellps=clrk66 +nadgrids=conus \
49
+to +proj=latlong +datum=NAD83 \
51
111d00'00.000"W 44d00'00.000"N 0.0
52
111d00'00.000"W 39d00'00.000"N 0.0
55
echo "##############################################################" >> ${OUT}
56
echo Test MD used where available >> ${OUT}
58
$EXE +proj=latlong +ellps=clrk66 +nadgrids=MD,conus \
59
+to +proj=latlong +datum=NAD83 \
61
79d58'00.000"W 37d02'00.000"N 0.0
62
79d58'00.000"W 36d58'00.000"N 0.0
65
$EXE +proj=latlong +ellps=clrk66 +nadgrids=conus \
66
+to +proj=latlong +datum=NAD83 \
68
79d58'00.000"W 37d02'00.000"N 0.0
69
79d58'00.000"W 36d58'00.000"N 0.0
72
##############################################################################
74
# do 'diff' with distribution results
75
echo "diff ${OUT} with ${OUT}.dist"
76
diff -b ${OUT} ${OUT}.dist
77
if [ $? -ne 0 ] ; then
79
echo "PROBLEMS HAVE OCCURED"
80
echo "test file ${OUT} saved"
85
echo "test file ${OUT} removed"