diff options
Diffstat (limited to 'nad/testdatum')
| -rwxr-xr-x | nad/testdatum | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/nad/testdatum b/nad/testdatum new file mode 100755 index 00000000..497d96c1 --- /dev/null +++ b/nad/testdatum @@ -0,0 +1,61 @@ +: +# Script to do some testing of datum shifts. +# +# +OUT=td_out +EXE=../src/cs2cs +# +echo "doing tests into file ${OUT}, please wait" +rm -f ${OUT} +# +echo "##############################################################" >> ${OUT} +echo 1st through ntv1, 2nd through conus >> ${OUT} +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=ntv1_can.dat,conus \ + +to +proj=latlong +datum=NAD83 \ + -E >>${OUT} <<EOF +111d00'00.000"W 44d00'00.000"N 0.0 +111d00'00.000"W 39d00'00.000"N 0.0 +EOF + +echo "##############################################################" >> ${OUT} +echo As above, but without ntv1 everything goes through conus file. >> ${OUT} +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=conus \ + +to +proj=latlong +datum=NAD83 \ + -E >>${OUT} <<EOF +111d00'00.000"W 44d00'00.000"N 0.0 +111d00'00.000"W 39d00'00.000"N 0.0 +EOF + +echo "##############################################################" >> ${OUT} +echo Test MD used where available >> ${OUT} +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=MD,conus \ + +to +proj=latlong +datum=NAD83 \ + -E >>${OUT} <<EOF +79d58'00.000"W 37d02'00.000"N 0.0 +79d58'00.000"W 36d58'00.000"N 0.0 +EOF +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=conus \ + +to +proj=latlong +datum=NAD83 \ + -E >>${OUT} <<EOF +79d58'00.000"W 37d02'00.000"N 0.0 +79d58'00.000"W 36d58'00.000"N 0.0 +EOF +# +############################################################################## +# Done! +# do 'diff' with distribution results +echo "diff ${OUT} with ${OUT}.dist" +diff -b ${OUT} ${OUT}.dist +if [ $? -ne 0 ] ; then + echo "" + echo "PROBLEMS HAVE OCCURED" + echo "test file ${OUT} saved" +else + echo "TEST OK" + echo "test file ${OUT} removed" + /bin/rm -f ${OUT} +fi |
