diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-12-10 14:36:07 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-12-10 15:25:02 +0100 |
| commit | 2c3a7c8bcc711cf34b79885edbf1e5dccacc5757 (patch) | |
| tree | 62fad710df23f50d8c15ad7625e6f814488078af /test/cli | |
| parent | 29474bd7fdac013841a4795e93f714bba7791c56 (diff) | |
| download | PROJ-2c3a7c8bcc711cf34b79885edbf1e5dccacc5757.tar.gz PROJ-2c3a7c8bcc711cf34b79885edbf1e5dccacc5757.zip | |
ob_tran: restore traditional handling of +to_meter with pj_transform() and proj utility (fixes #1782)
Fixes side-effect of https://github.com/OSGeo/PROJ/issues/1525 that went in 6.1.1
The correction is horribly hacky. Sorry...
Diffstat (limited to 'test/cli')
| -rw-r--r-- | test/cli/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | test/cli/Makefile.am | 7 | ||||
| -rwxr-xr-x | test/cli/testproj | 55 | ||||
| -rw-r--r-- | test/cli/testproj_out.dist | 1 |
4 files changed, 63 insertions, 1 deletions
diff --git a/test/cli/CMakeLists.txt b/test/cli/CMakeLists.txt index 4e1ab75a..feef5bf0 100644 --- a/test/cli/CMakeLists.txt +++ b/test/cli/CMakeLists.txt @@ -7,6 +7,7 @@ set(PROJINFO_BIN "projinfo") set(CCT_BIN "cct") proj_add_test_script_sh("test27" PROJ_BIN) proj_add_test_script_sh("test83" PROJ_BIN) +proj_add_test_script_sh("testproj" PROJ_BIN) proj_add_test_script_sh("testvarious" CS2CS_BIN) proj_add_test_script_sh("testdatumfile" CS2CS_BIN "connu") proj_add_test_script_sh("testIGNF" CS2CS_BIN "ntf_r93.gsb") diff --git a/test/cli/Makefile.am b/test/cli/Makefile.am index 758352c6..fb7169e4 100644 --- a/test/cli/Makefile.am +++ b/test/cli/Makefile.am @@ -10,6 +10,7 @@ CCTEXE = $(EXEPATH)/cct # PROJ.4 test scripts TEST27 = $(THIS_DIR)/test27 TEST83 = $(THIS_DIR)/test83 +TESTPROJ = $(THIS_DIR)/testproj TESTNTV2 = $(THIS_DIR)/testntv2 TESTVARIOUS = $(THIS_DIR)/testvarious TESTFLAKY = $(THIS_DIR)/testflaky @@ -24,6 +25,7 @@ EXTRA_DIST = pj_out27.dist pj_out83.dist td_out.dist \ testIGNF proj_outIGNF.dist \ testprojinfo testprojinfo_out.dist \ testcct testcct_out.dist \ + testproj testproj_out.dist \ CMakeLists.txt testprojinfo-check: @@ -35,6 +37,9 @@ test27-check: test83-check: $(TEST83) $(PROJEXE) +testproj-check: + $(TESTPROJ) $(PROJEXE) + testvarious-check: PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE) @@ -56,4 +61,4 @@ testntv2-check: testcct-check: PROJ_LIB=$(PROJ_LIB) $(TESTCCT) $(CCTEXE) -check-local: testprojinfo-check test27-check test83-check testvarious-check testdatumfile-check testign-check testntv2-check testcct-check +check-local: testprojinfo-check test27-check test83-check testproj-check testvarious-check testdatumfile-check testign-check testntv2-check testcct-check 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 diff --git a/test/cli/testproj_out.dist b/test/cli/testproj_out.dist new file mode 100644 index 00000000..fad0a014 --- /dev/null +++ b/test/cli/testproj_out.dist @@ -0,0 +1 @@ +2 49 2.000 49.000 |
