X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.maps.server%2Fserver%2Fdist%2Fshare%2Fproj%2Ftestdatumfile;fp=org.simantics.maps.server%2Fserver%2Fdist%2Fshare%2Fproj%2Ftestdatumfile;h=e3f2764ff6122a36628f07849c26af5d05572a70;hb=a018cc96644b634cec0dd999298cd374648e2980;hp=0000000000000000000000000000000000000000;hpb=4fb69ee0635d0a03b6a4253d5c1cd920c5eb5366;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server/server/dist/share/proj/testdatumfile b/org.simantics.maps.server/server/dist/share/proj/testdatumfile new file mode 100644 index 00000000..e3f2764f --- /dev/null +++ b/org.simantics.maps.server/server/dist/share/proj/testdatumfile @@ -0,0 +1,114 @@ +: +# Script to do some testing of various transformations depending on datum +# files that are not always available. +# +# +NAD_DIR=`dirname $0` +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=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} <> ${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} <> ${OUT} +echo Test MD used where available >> ${OUT} +# +$EXE +proj=latlong +ellps=clrk66 +nadgrids=MD,conus \ + +to +proj=latlong +datum=NAD83 \ + -E >>${OUT} <>${OUT} <> ${OUT} +echo "Test that we use grid shift files even if we are right on the" >> ${OUT} +echo "edge or even a wee bit outside (#141)." >> ${OUT} +# +# Our test points are (1) right on mesh corner, (2) outside but within +# epsilon (3) inside a bit (4) outside by more than epsilon +# +$EXE +proj=latlong +ellps=WGS84 +nadgrids=ntf_r93.gsb \ + +to +proj=latlong +datum=WGS84 \ + -E -f "%.12f" >>${OUT} <>${OUT} <