diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-12-15 20:50:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-15 20:50:15 +0100 |
| commit | e5526bca37a5b88f36645fa8a6ff9cf3fd31ecfa (patch) | |
| tree | 038a65e379d4c23c5f0af3572aec05378c29710c /test/cli/testproj | |
| parent | 6125d3b5a488d6dbaa536d0bde9125a63c1dc91a (diff) | |
| parent | 2c3a7c8bcc711cf34b79885edbf1e5dccacc5757 (diff) | |
| download | PROJ-e5526bca37a5b88f36645fa8a6ff9cf3fd31ecfa.tar.gz PROJ-e5526bca37a5b88f36645fa8a6ff9cf3fd31ecfa.zip | |
Merge pull request #1783 from rouault/restore_ob_tran_to_meter_compat_with_pj_transform
ob_tran: restore traditional handling of +to_meter with pj_transform() and proj utility (fixes #1782)
Diffstat (limited to 'test/cli/testproj')
| -rwxr-xr-x | test/cli/testproj | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/cli/testproj b/test/cli/testproj new file mode 100755 index 00000000..8686224e --- /dev/null +++ b/test/cli/testproj @@ -0,0 +1,55 @@ +: +# Script to test proj exe +# +TEST_CLI_DIR=`dirname $0` +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'proj' program>" + 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 + +if test -z "${PROJ_LIB}"; then + export PROJ_LIB="`dirname $0`/../../data" +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + +OUT=testproj_out +# +echo "doing tests into file ${OUT}, please wait" +# +$EXE +ellps=WGS84 +proj=ob_tran +o_proj=latlon +o_lon_p=0.0 +o_lat_p=90.0 +lon_0=360.0 +to_meter=0.0174532925199433 +no_defs -E -f '%.3f' >${OUT} <<EOF +2 49 +EOF + +# +# do 'diff' with distribution results +echo "diff ${OUT} with testproj_out.dist" +diff -u -b ${OUT} ${TEST_CLI_DIR}/testproj_out.dist +if [ $? -ne 0 ] ; then + echo "" + echo "PROBLEMS HAVE OCCURRED" + echo "test file ${OUT} saved" + echo + exit 100 +else + echo "TEST OK" + echo "test file ${OUT} removed" + echo + /bin/rm -f ${OUT} + exit 0 +fi |
