aboutsummaryrefslogtreecommitdiff
path: root/test/cli
diff options
context:
space:
mode:
Diffstat (limited to 'test/cli')
-rw-r--r--test/cli/CMakeLists.txt10
-rw-r--r--test/cli/Makefile.am20
-rwxr-xr-xtest/cli/test279
-rwxr-xr-xtest/cli/test839
-rwxr-xr-xtest/cli/testIGNF5
-rwxr-xr-xtest/cli/testcct1
-rwxr-xr-xtest/cli/testdatumfile3
-rwxr-xr-xtest/cli/testflaky3
-rwxr-xr-xtest/cli/testntv23
-rwxr-xr-xtest/cli/testprojinfo19
-rw-r--r--test/cli/testprojinfo_out.dist264
-rwxr-xr-xtest/cli/testvarious28
-rw-r--r--test/cli/tv_out.dist8
13 files changed, 294 insertions, 88 deletions
diff --git a/test/cli/CMakeLists.txt b/test/cli/CMakeLists.txt
index 0c4ccf1b..4e1ab75a 100644
--- a/test/cli/CMakeLists.txt
+++ b/test/cli/CMakeLists.txt
@@ -5,11 +5,11 @@ set(CS2CS_BIN "cs2cs")
set(PROJ_BIN "proj")
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("testvarious" CS2CS_BIN )
+proj_add_test_script_sh("test27" PROJ_BIN)
+proj_add_test_script_sh("test83" 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")
proj_add_test_script_sh("testntv2" CS2CS_BIN "ntv2_0.gsb")
-proj_add_test_script_sh("testprojinfo" PROJINFO_BIN )
-proj_add_test_script_sh("testcct" CCT_BIN )
+proj_add_test_script_sh("testprojinfo" PROJINFO_BIN)
+proj_add_test_script_sh("testcct" CCT_BIN)
diff --git a/test/cli/Makefile.am b/test/cli/Makefile.am
index c0bc0871..47cb1e7f 100644
--- a/test/cli/Makefile.am
+++ b/test/cli/Makefile.am
@@ -1,5 +1,5 @@
# Executables paths passed to test scripts
-DATAPATH = ../../data
+PROJ_LIB ?= ../../data
THIS_DIR = $(top_srcdir)/test/cli
EXEPATH = ../../src
PROJEXE = $(EXEPATH)/proj
@@ -27,7 +27,7 @@ EXTRA_DIST = pj_out27.dist pj_out83.dist td_out.dist \
CMakeLists.txt
testprojinfo-check:
- PROJ_LIB=$(DATAPATH) $(TESTPROJINFO) $(PROJINFOEXE)
+ PROJ_LIB=$(PROJ_LIB) $(TESTPROJINFO) $(PROJINFOEXE)
test27-check:
$(TEST27) $(PROJEXE)
@@ -36,24 +36,24 @@ test83-check:
$(TEST83) $(PROJEXE)
testvarious-check:
- PROJ_LIB=$(DATAPATH) $(TESTVARIOUS) $(CS2CSEXE)
+ PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE)
testdatumfile-check:
- @if [ -f $(DATAPATH)/conus -a -f $(DATAPATH)/ntv1_can.dat -a -f $(DATAPATH)/MD -a -f $(DATAPATH)/ntf_r93.gsb ]; then \
- PROJ_LIB=$(DATAPATH) $(TESTDATUMFILE) $(CS2CSEXE) ; \
+ @if [ -f $(PROJ_LIB)/conus -a -f $(PROJ_LIB)/ntv1_can.dat -a -f $(PROJ_LIB)/MD -a -f $(PROJ_LIB)/ntf_r93.gsb ]; then \
+ PROJ_LIB=$(PROJ_LIB) $(TESTDATUMFILE) $(CS2CSEXE) ; \
fi
testign-check:
- @if [ -f $(DATAPATH)/ntf_r93.gsb ] ; then \
- PROJ_LIB=$(DATAPATH) $(TESTIGN) $(CS2CSEXE) ; \
+ @if [ -f $(PROJ_LIB)/ntf_r93.gsb ] ; then \
+ PROJ_LIB=$(PROJ_LIB) $(TESTIGN) $(CS2CSEXE) ; \
fi
testntv2-check:
- @if [ -f $(DATAPATH)/ntv2_0.gsb ] ; then \
- PROJ_LIB=$(DATAPATH) $(TESTNTV2) $(CS2CSEXE) ; \
+ @if [ -f $(PROJ_LIB)/ntv2_0.gsb ] ; then \
+ PROJ_LIB=$(PROJ_LIB) $(TESTNTV2) $(CS2CSEXE) ; \
fi
testcct-check:
- PROJ_LIB=$(DATAPATH) $(TESTCCT) $(CCTEXE)
+ PROJ_LIB=$(PROJ_LIB) $(TESTCCT) $(CCTEXE)
check-local: testprojinfo-check test27-check test83-check testvarious-check testdatumfile-check testign-check testntv2-check testcct-check
diff --git a/test/cli/test27 b/test/cli/test27
index 43c060d8..bfc1cb0a 100755
--- a/test/cli/test27
+++ b/test/cli/test27
@@ -7,7 +7,6 @@
# Mercator due to greater precision of meridional distance function.
#
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -26,12 +25,16 @@ if test ! -x ${EXE}; then
exit 1
fi
+if test -z "${PROJ_LIB}"; then
+ export PROJ_LIB="`dirname $0`/../../data"
+fi
+
echo "============================================"
echo "Running ${0} using ${EXE}:"
echo "============================================"
OUT=proj_out27
-INIT_FILE=${DATA_DIR}/nad27
+INIT_FILE=${PROJ_LIB}/nad27
#
echo "doing tests into file ${OUT}, please wait"
#
@@ -833,7 +836,7 @@ EOF
#
# do 'diff' with distribution results
echo "diff ${OUT} with pj_out27.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/pj_out27.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/pj_out27.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/test83 b/test/cli/test83
index 82b491a7..cfb1365e 100755
--- a/test/cli/test83
+++ b/test/cli/test83
@@ -8,7 +8,6 @@
# Mercator due to greater precision of meridional distance function.
#
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -27,12 +26,16 @@ if test ! -x ${EXE}; then
exit 1
fi
+if test -z "${PROJ_LIB}"; then
+ export PROJ_LIB="`dirname $0`/../../data"
+fi
+
echo "============================================"
echo "Running ${0} using ${EXE}:"
echo "============================================"
OUT=proj_out83
-INIT_FILE=${DATA_DIR}/nad83
+INIT_FILE=${PROJ_LIB}/nad83
#
echo "doing tests into file ${OUT}, please wait"
#
@@ -714,7 +717,7 @@ EOF
#
# do 'diff' with distribution results
echo "diff ${OUT} with pj_out83.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/pj_out83.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/pj_out83.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/testIGNF b/test/cli/testIGNF
index 0fa04e84..aa8c3354 100755
--- a/test/cli/testIGNF
+++ b/test/cli/testIGNF
@@ -12,7 +12,6 @@
# the gsb grid is still ok
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -32,7 +31,7 @@ if test ! -x ${EXE}; then
fi
if test -z "${PROJ_LIB}"; then
- export PROJ_LIB=${DATA_DIR}
+ export PROJ_LIB="`dirname $0`/../../data"
fi
echo "============================================"
@@ -159,7 +158,7 @@ EOF
#
# do 'diff' with distribution results
echo "diff ${OUT} with ${OUT}.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/testcct b/test/cli/testcct
index 93749052..3fb0dd95 100755
--- a/test/cli/testcct
+++ b/test/cli/testcct
@@ -2,7 +2,6 @@
# Test cct
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
diff --git a/test/cli/testdatumfile b/test/cli/testdatumfile
index e8995150..5b56f077 100755
--- a/test/cli/testdatumfile
+++ b/test/cli/testdatumfile
@@ -4,7 +4,6 @@
#
#
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -114,7 +113,7 @@ rm -rf "dir with \" space"
# Done!
# do 'diff' with distribution results
echo "diff ${OUT} with ${OUT}.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/testflaky b/test/cli/testflaky
index af56a9cd..23580146 100755
--- a/test/cli/testflaky
+++ b/test/cli/testflaky
@@ -4,7 +4,6 @@
#
#
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -59,7 +58,7 @@ EOF
# Done!
# do 'diff' with distribution results
echo "diff ${OUT} with ${OUT}.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/testntv2 b/test/cli/testntv2
index e82026fc..73371dbe 100755
--- a/test/cli/testntv2
+++ b/test/cli/testntv2
@@ -4,7 +4,6 @@
#
#
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -58,7 +57,7 @@ EOF
# Done!
# do 'diff' with distribution results
echo "diff ${OUT} with ${OUT}.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index 111c071e..d8569a76 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -2,7 +2,6 @@
# Test projinfo
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -29,6 +28,8 @@ OUT=testprojinfo_out
rm -f ${OUT}
+export PROJINFO_NO_GRID_CHECK=YES
+
echo "Testing projinfo EPSG:4326" >> ${OUT}
$EXE EPSG:4326 >>${OUT}
echo "" >>${OUT}
@@ -53,6 +54,10 @@ echo "Testing projinfo -s EPSG:4326 -t EPSG:32631" >> ${OUT}
$EXE -s EPSG:4326 -t EPSG:32631 >>${OUT}
echo "" >>${OUT}
+echo "Testing projinfo -s NAD27 -t NAD83" >> ${OUT}
+$EXE -s NAD27 -t NAD83 >>${OUT}
+echo "" >>${OUT}
+
echo "Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary" >> ${OUT}
$EXE -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary >>${OUT}
echo "" >>${OUT}
@@ -98,6 +103,18 @@ echo "Testing CRS with towgs84: projinfo -o PROJ EPSG:25832" >> ${OUT}
$EXE -o PROJ EPSG:25832 >>${OUT} 2>&1
echo "" >>${OUT}
+echo "Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4977" >> ${OUT}
+$EXE -s EPSG:5613 -t EPSG:4977 >>${OUT} 2>&1
+echo "" >>${OUT}
+
+echo "Testing NAD83(2011) + NAVD88 height -> NAD83(2011) : projinfo -s EPSG:6349 -t EPSG:6319 --spatial-test intersects -o PROJ" >> ${OUT}
+$EXE -s EPSG:6349 -t EPSG:6319 --spatial-test intersects -o PROJ >>${OUT} 2>&1
+echo "" >>${OUT}
+
+echo "Testing NGF IGN69 height to RGF93: projinfo -s EPSG:5720 -t EPSG:4965 -o PROJ" >> ${OUT}
+$EXE -s EPSG:5720 -t EPSG:4965 -o PROJ >>${OUT} 2>&1
+echo "" >>${OUT}
+
# do 'diff' with distribution results
echo "diff ${OUT} with testprojinfo_out.dist"
diff -u ${OUT} ${TEST_CLI_DIR}/testprojinfo_out.dist
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index ebc59c40..ea0f4983 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -136,6 +136,10 @@ GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.25722
Testing projinfo -s EPSG:4326 -t EPSG:32631
+Candidate operations found: 1
+-------------------------------------
+Operation n°1:
+
EPSG:16031, UTM zone 31N, 0 m, World - N hemisphere - 0°E to 6°E
PROJ string:
@@ -162,17 +166,74 @@ CONVERSION["UTM zone 31N",
ID["EPSG",8807]],
ID["EPSG",16031]]
+Testing projinfo -s NAD27 -t NAD83
+Candidate operations found: 1
+Note: using '--spatial-test intersects' would bring more results (7)
+-------------------------------------
+Operation n°1:
+
+unknown id, Ballpark geographic offset from NAD27 to NAD83, unknown accuracy, World, has ballpark transformation
+
+PROJ string:
++proj=noop
+
+WKT2_2018 string:
+COORDINATEOPERATION["Ballpark geographic offset from NAD27 to NAD83",
+ SOURCECRS[
+ GEOGCRS["NAD27",
+ DATUM["North American Datum 1927",
+ ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
+ LENGTHUNIT["metre",1]]],
+ PRIMEM["Greenwich",0,
+ ANGLEUNIT["degree",0.0174532925199433]],
+ CS[ellipsoidal,2],
+ AXIS["geodetic latitude (Lat)",north,
+ ORDER[1],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ AXIS["geodetic longitude (Lon)",east,
+ ORDER[2],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
+ TARGETCRS[
+ GEOGCRS["NAD83",
+ DATUM["North American Datum 1983",
+ ELLIPSOID["GRS 1980",6378137,298.257222101,
+ LENGTHUNIT["metre",1]]],
+ PRIMEM["Greenwich",0,
+ ANGLEUNIT["degree",0.0174532925199433]],
+ CS[ellipsoidal,2],
+ AXIS["geodetic latitude (Lat)",north,
+ ORDER[1],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ AXIS["geodetic longitude (Lon)",east,
+ ORDER[2],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
+ METHOD["Geographic2D offsets",
+ ID["EPSG",9619]],
+ PARAMETER["Latitude offset",0,
+ ANGLEUNIT["degree",0.0174532925199433],
+ ID["EPSG",8601]],
+ PARAMETER["Longitude offset",0,
+ ANGLEUNIT["degree",0.0174532925199433],
+ ID["EPSG",8602]],
+ USAGE[
+ SCOPE["unknown"],
+ AREA["World"],
+ BBOX[-90,-180,90,180]]]
+
Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects --summary
Candidate operations found: 7
DERIVED_FROM(EPSG):1312, NAD27 to NAD83 (3), 1.0 m, Canada
DERIVED_FROM(EPSG):1313, NAD27 to NAD83 (4), 1.5 m, Canada - NAD27
DERIVED_FROM(EPSG):1241, NAD27 to NAD83 (1), 0.15 m, USA - CONUS including EEZ
DERIVED_FROM(EPSG):1243, NAD27 to NAD83 (2), 0.5 m, USA - Alaska including EEZ
-unknown id, Null geographic offset from NAD27 to NAD83, unknown accuracy, World
EPSG:1462, NAD27 to NAD83 (5), 1.0 m, Canada - Quebec
EPSG:1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec
+unknown id, Ballpark geographic offset from NAD27 to NAD83, unknown accuracy, World, has ballpark transformation
Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects
+Candidate operations found: 7
-------------------------------------
Operation n°1:
@@ -196,7 +257,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (3)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
@@ -210,7 +272,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (3)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
METHOD["NTv1",
ID["EPSG",9614]],
PARAMETERFILE["Latitude and longitude difference file","ntv1_can.dat"],
@@ -244,7 +307,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (4)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
@@ -258,7 +322,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (4)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
METHOD["NTv2",
ID["EPSG",9615]],
PARAMETERFILE["Latitude and longitude difference file","ntv2_0.gsb"],
@@ -292,7 +357,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (1)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
@@ -306,7 +372,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (1)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
METHOD["CTABLE2"],
PARAMETERFILE["Latitude and longitude difference file","conus"],
OPERATIONACCURACY[0.15],
@@ -339,7 +406,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (2)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
@@ -353,7 +421,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (2)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
METHOD["CTABLE2"],
PARAMETERFILE["Latitude and longitude difference file","alaska"],
OPERATIONACCURACY[0.5],
@@ -366,13 +435,14 @@ COORDINATEOPERATION["NAD27 to NAD83 (2)",
-------------------------------------
Operation n°5:
-unknown id, Null geographic offset from NAD27 to NAD83, unknown accuracy, World
+EPSG:1462, NAD27 to NAD83 (5), 1.0 m, Canada - Quebec
PROJ string:
-
++proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=GS2783v1.QUE +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
WKT2_2018 string:
-COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83",
+COORDINATEOPERATION["NAD27 to NAD83 (5)",
+ VERSION["SGQ-Can QC NT1"],
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
@@ -387,10 +457,6 @@ COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83",
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
- USAGE[
- SCOPE["unknown"],
- AREA["North America - NAD27"],
- BBOX[7.15,167.65,83.17,-47.74]],
ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
@@ -406,34 +472,28 @@ COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83",
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
- USAGE[
- SCOPE["unknown"],
- AREA["North America - NAD83"],
- BBOX[14.92,167.65,86.46,-47.74]],
ID["EPSG",4269]]],
- METHOD["Geographic2D offsets",
- ID["EPSG",9619]],
- PARAMETER["Latitude offset",0,
- ANGLEUNIT["degree",0.0174532925199433],
- ID["EPSG",8601]],
- PARAMETER["Longitude offset",0,
- ANGLEUNIT["degree",0.0174532925199433],
- ID["EPSG",8602]],
+ METHOD["NTv1",
+ ID["EPSG",9614]],
+ PARAMETERFILE["Latitude and longitude difference file","GS2783v1.QUE"],
+ OPERATIONACCURACY[1.0],
USAGE[
SCOPE["unknown"],
- AREA["World"],
- BBOX[-90,-180,90,180]]]
+ AREA["Canada - Quebec"],
+ BBOX[44.99,-79.85,62.62,-57.1]],
+ ID["EPSG",1462]]
-------------------------------------
Operation n°6:
-EPSG:1462, NAD27 to NAD83 (5), 1.0 m, Canada - Quebec
+EPSG:1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec
PROJ string:
-+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=GS2783v1.QUE +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
++proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=QUE27-83.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
WKT2_2018 string:
-COORDINATEOPERATION["NAD27 to NAD83 (5)",
+COORDINATEOPERATION["NAD27 to NAD83 (6)",
+ VERSION["SGQ-Can QC NT2"],
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
@@ -447,7 +507,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (5)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
@@ -461,27 +522,28 @@ COORDINATEOPERATION["NAD27 to NAD83 (5)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
- METHOD["NTv1",
- ID["EPSG",9614]],
- PARAMETERFILE["Latitude and longitude difference file","GS2783v1.QUE"],
- OPERATIONACCURACY[1.0],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
+ METHOD["NTv2",
+ ID["EPSG",9615]],
+ PARAMETERFILE["Latitude and longitude difference file","QUE27-83.gsb"],
+ OPERATIONACCURACY[1.5],
USAGE[
SCOPE["unknown"],
AREA["Canada - Quebec"],
BBOX[44.99,-79.85,62.62,-57.1]],
- ID["EPSG",1462]]
+ ID["EPSG",1573]]
-------------------------------------
Operation n°7:
-EPSG:1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec
+unknown id, Ballpark geographic offset from NAD27 to NAD83, unknown accuracy, World, has ballpark transformation
PROJ string:
-+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=QUE27-83.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
++proj=noop
WKT2_2018 string:
-COORDINATEOPERATION["NAD27 to NAD83 (6)",
+COORDINATEOPERATION["Ballpark geographic offset from NAD27 to NAD83",
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
@@ -495,7 +557,8 @@ COORDINATEOPERATION["NAD27 to NAD83 (6)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4267]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
@@ -509,16 +572,20 @@ COORDINATEOPERATION["NAD27 to NAD83 (6)",
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
- ANGLEUNIT["degree",0.0174532925199433]]]],
- METHOD["NTv2",
- ID["EPSG",9615]],
- PARAMETERFILE["Latitude and longitude difference file","QUE27-83.gsb"],
- OPERATIONACCURACY[1.5],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4269]]],
+ METHOD["Geographic2D offsets",
+ ID["EPSG",9619]],
+ PARAMETER["Latitude offset",0,
+ ANGLEUNIT["degree",0.0174532925199433],
+ ID["EPSG",8601]],
+ PARAMETER["Longitude offset",0,
+ ANGLEUNIT["degree",0.0174532925199433],
+ ID["EPSG",8602]],
USAGE[
SCOPE["unknown"],
- AREA["Canada - Quebec"],
- BBOX[44.99,-79.85,62.62,-57.1]],
- ID["EPSG",1573]]
+ AREA["World"],
+ BBOX[-90,-180,90,180]]]
Testing projinfo -s EPSG:4230 -t EPSG:4258 --bbox 8,54.51,15.24,57.8 --summary
Candidate operations found: 1
@@ -564,7 +631,8 @@ PROJCRS["Monte Mario (Rome) / Italy zone 1",
ELLIPSOID["International 1924",6378388,297,
LENGTHUNIT["metre",1]]],
PRIMEM["Rome",12.4523333333333,
- ANGLEUNIT["degree",0.0174532925199433]]],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ ID["EPSG",4806]],
CONVERSION["Italy zone 1",
METHOD["Transverse Mercator",
ID["EPSG",9807]],
@@ -625,3 +693,93 @@ Testing CRS with towgs84: projinfo -o PROJ EPSG:25832
PROJ.4 string:
+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs
+Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4977
+Candidate operations found: 1
+-------------------------------------
+Operation n°1:
+
+PROJ:EPSG_5613_TO_EPSG_4977, RH2000 height to SWEREF99, unknown accuracy, Sweden - onshore
+
+PROJ string:
++proj=vgridshift +grids=SWEN17_RH2000.gtx +multiplier=1
+
+WKT2_2018 string:
+COORDINATEOPERATION["RH2000 height to SWEREF99",
+ SOURCECRS[
+ VERTCRS["RH2000 height",
+ VDATUM["Rikets hojdsystem 2000"],
+ CS[vertical,1],
+ AXIS["gravity-related height (H)",up,
+ LENGTHUNIT["metre",1]],
+ ID["EPSG",5613]]],
+ TARGETCRS[
+ GEOGCRS["SWEREF99",
+ DATUM["SWEREF99",
+ ELLIPSOID["GRS 1980",6378137,298.257222101,
+ LENGTHUNIT["metre",1]]],
+ PRIMEM["Greenwich",0,
+ ANGLEUNIT["degree",0.0174532925199433]],
+ CS[ellipsoidal,3],
+ AXIS["geodetic latitude (Lat)",north,
+ ORDER[1],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ AXIS["geodetic longitude (Lon)",east,
+ ORDER[2],
+ ANGLEUNIT["degree",0.0174532925199433]],
+ AXIS["ellipsoidal height (h)",up,
+ ORDER[3],
+ LENGTHUNIT["metre",1]],
+ ID["EPSG",4977]]],
+ METHOD["GravityRelatedHeight to Geographic3D",
+ ID["PROJ","HEIGHT_TO_GEOGRAPHIC3D"]],
+ PARAMETERFILE["Geoid (height correction) model file","SWEN17_RH2000.gtx"],
+ USAGE[
+ SCOPE["unknown"],
+ AREA["Sweden - onshore"],
+ BBOX[55.28,10.93,69.07,24.17]],
+ ID["PROJ","EPSG_5613_TO_EPSG_4977"]]
+
+Testing NAD83(2011) + NAVD88 height -> NAD83(2011) : projinfo -s EPSG:6349 -t EPSG:6319 --spatial-test intersects -o PROJ
+Candidate operations found: 2
+-------------------------------------
+Operation n°1:
+
+unknown id, Inverse of NAD83(2011) to NAVD88 height (1), 0.1 m, USA - CONUS - onshore
+
+PROJ string:
++proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=vgridshift +grids=g2012bu0.gtx +multiplier=1 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
+
+-------------------------------------
+Operation n°2:
+
+unknown id, Inverse of NAD83(2011) to NAVD88 height (2), 0.2 m, USA - Alaska
+
+PROJ string:
++proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=vgridshift +grids=g2012ba0.gtx +multiplier=1 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
+
+Testing NGF IGN69 height to RGF93: projinfo -s EPSG:5720 -t EPSG:4965 -o PROJ
+Candidate operations found: 3
+-------------------------------------
+Operation n°1:
+
+INVERSE(DERIVED_FROM(EPSG)):8885, Inverse of RGF93 to NGF IGN69 height (3), 0.01 m, France - mainland onshore
+
+PROJ string:
++proj=vgridshift +grids=RAF18.gtx +multiplier=1
+
+-------------------------------------
+Operation n°2:
+
+INVERSE(DERIVED_FROM(EPSG)):8371, Inverse of RGF93 to NGF IGN69 height (2), 0.02 m, France - mainland onshore
+
+PROJ string:
++proj=vgridshift +grids=RAF09.gtx +multiplier=1
+
+-------------------------------------
+Operation n°3:
+
+INVERSE(EPSG):10000, Inverse of RGF93 to NGF IGN69 height (1), 0.5 m, France - mainland onshore
+
+PROJ string:
++proj=pipeline +step +inv +proj=vgridshift +grids=ggf97a.txt +multiplier=1
+
diff --git a/test/cli/testvarious b/test/cli/testvarious
index c1fa61df..2e2d854c 100755
--- a/test/cli/testvarious
+++ b/test/cli/testvarious
@@ -4,7 +4,6 @@
#
#
TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
EXE=$1
usage()
@@ -24,7 +23,7 @@ if test ! -x ${EXE}; then
fi
if test -z "${PROJ_LIB}"; then
- export PROJ_LIB=$DATA_DIR
+ export PROJ_LIB="`dirname $0`/../../data"
fi
# Would be great to have a universale way of selecting a locale with
@@ -954,10 +953,33 @@ $EXE EPSG:32631 EPSG:4326 -E >> ${OUT} <<EOF
EOF
+echo "##############################################################" >> ${OUT}
+echo "Test EPSG:4896 to EPSG:7930" >> ${OUT}
+# Here we test that 4D coordinates are handled by cs2cs. Due to backwards
+# compatibility, the t-component is not written to STDOUT as part of the
+# coordinate data, but rather as part of the string that follows the xyz
+# components. This is only seen by users when the -E option is used. Which
+# means that this test also experience that behaviour.
+$EXE -f %.4f EPSG:4896 EPSG:7930 -E >> ${OUT} <<EOF
+3496737.2679 743254.4507 5264462.9620 2019.0
+3496737.2679 743254.4507 5264462.9620 2029.0
+EOF
+
+
+echo "##############################################################" >> ${OUT}
+echo "Test ITRF2000 to ITRF1993" >> ${OUT}
+# Here we test that HUGE_VAL is passed as the time value if not explicitly
+# specified
+$EXE -f %.7f ITRF2000 ITRF1993 -E >> ${OUT} <<EOF
+59.4967 -117.61748 329.396
+59.4967 -117.61748 329.396 1988
+EOF
+
+
# Done!
# do 'diff' with distribution results
echo "diff ${OUT} with ${OUT}.dist"
-diff -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
+diff -u -b ${OUT} ${TEST_CLI_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURRED"
diff --git a/test/cli/tv_out.dist b/test/cli/tv_out.dist
index 257e9400..dcda5275 100644
--- a/test/cli/tv_out.dist
+++ b/test/cli/tv_out.dist
@@ -460,3 +460,11 @@ Test EPSG:4326 to EPSG:32631
##############################################################
Test EPSG:32631 to EPSG:4326
400000 5000000 0 45d8'47.014"N 1d43'40.681"E 0.000
+##############################################################
+Test EPSG:4896 to EPSG:7930
+3496737.2679 743254.4507 5264462.9620 3496737.7857 743254.0394 5264462.6437 2019.0
+3496737.2679 743254.4507 5264462.9620 3496737.9401 743253.8861 5264462.5497 2029.0
+##############################################################
+Test ITRF2000 to ITRF1993
+59.4967 -117.61748 329.396 59.4967002 -117.6174799 329.3845529
+59.4967 -117.61748 329.396 59.4967002 -117.6174799 329.3845529 1988