From 70bc293a43def169fa34ed8e97a5cb06b336f247 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 12:18:16 +0100 Subject: Vertical CRS transformation: synthetize a vertical unit change transformation when needed, and also sort Null geographic offset transformation in last --- test/cli/testprojinfo_out.dist | 92 +++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index ebc59c40..15372803 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -168,9 +168,9 @@ 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, Null geographic offset from NAD27 to NAD83, unknown accuracy, World Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects ------------------------------------- @@ -366,13 +366,13 @@ 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)", SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", @@ -386,12 +386,7 @@ COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83", ANGLEUNIT["degree",0.0174532925199433]], 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]]], + ANGLEUNIT["degree",0.0174532925199433]]]], TARGETCRS[ GEOGCRS["NAD83", DATUM["North American Datum 1983", @@ -405,35 +400,27 @@ COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83", ANGLEUNIT["degree",0.0174532925199433]], 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]], + ANGLEUNIT["degree",0.0174532925199433]]]], + 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)", SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", @@ -462,26 +449,26 @@ COORDINATEOPERATION["NAD27 to NAD83 (5)", 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], + 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, Null geographic offset from NAD27 to NAD83, unknown accuracy, World 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 + WKT2_2018 string: -COORDINATEOPERATION["NAD27 to NAD83 (6)", +COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83", SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", @@ -495,7 +482,12 @@ COORDINATEOPERATION["NAD27 to NAD83 (6)", ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], - ANGLEUNIT["degree",0.0174532925199433]]]], + 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", DATUM["North American Datum 1983", @@ -509,16 +501,24 @@ 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]], + 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]], 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 -- cgit v1.2.3 From 2272ba8f6a77903203632111a44b44e544fe332b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 15:03:55 +0100 Subject: projinfo: advertize the use of '--spatial-test intersects' when it can bring more results --- test/cli/testprojinfo | 4 +++ test/cli/testprojinfo_out.dist | 69 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index 111c071e..24a1fdd5 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -53,6 +53,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} diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 15372803..0ce6150d 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,6 +166,70 @@ 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, Null geographic offset from NAD27 to NAD83, unknown accuracy, World + +PROJ string: + + +WKT2_2018 string: +COORDINATEOPERATION["Null 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]], + USAGE[ + SCOPE["unknown"], + AREA["North America - NAD27"], + BBOX[7.15,167.65,83.17,-47.74]], + 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]], + 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]], + 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 @@ -173,6 +241,7 @@ EPSG:1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec unknown id, Null geographic offset from NAD27 to NAD83, unknown accuracy, World Testing projinfo -s NAD27 -t NAD83 --grid-check none --spatial-test intersects +Candidate operations found: 7 ------------------------------------- Operation n°1: -- cgit v1.2.3 From 94578ea8ff38f4bc6b1f6f52b80ecf7359f5dfc2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 18:04:35 +0100 Subject: CoordinateOperation: add a hasBallparkTransformation() method that can be used to know if it includes a very approximative transformation term --- test/cli/testprojinfo_out.dist | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 0ce6150d..674e9631 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -172,13 +172,13 @@ Note: using '--spatial-test intersects' would bring more results (7) ------------------------------------- Operation n°1: -unknown id, Null geographic offset from NAD27 to NAD83, unknown accuracy, World +unknown id, Ballpark geographic offset from NAD27 to NAD83, unknown accuracy, World, has ballpark transformation PROJ string: WKT2_2018 string: -COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83", +COORDINATEOPERATION["Ballpark geographic offset from NAD27 to NAD83", SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", @@ -238,7 +238,7 @@ 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 EPSG:1462, NAD27 to NAD83 (5), 1.0 m, Canada - Quebec EPSG:1573, NAD27 to NAD83 (6), 1.5 m, Canada - Quebec -unknown id, Null geographic offset from NAD27 to NAD83, unknown accuracy, World +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 @@ -531,13 +531,13 @@ COORDINATEOPERATION["NAD27 to NAD83 (6)", ------------------------------------- Operation n°7: -unknown id, Null geographic offset from NAD27 to NAD83, unknown accuracy, World +unknown id, Ballpark geographic offset from NAD27 to NAD83, unknown accuracy, World, has ballpark transformation PROJ string: WKT2_2018 string: -COORDINATEOPERATION["Null geographic offset from NAD27 to NAD83", +COORDINATEOPERATION["Ballpark geographic offset from NAD27 to NAD83", SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", -- cgit v1.2.3 From 2620701a4bb51a20d49e869acddce2167ba791d0 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 22:16:13 +0100 Subject: proj.db: add custom entry for 'RH2000 height to SWEREF99' --- test/cli/testprojinfo | 4 ++++ test/cli/testprojinfo_out.dist | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index 24a1fdd5..e39e2193 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -102,6 +102,10 @@ 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:4377" >> ${OUT} +$EXE -s EPSG:5613 -t EPSG:4377 >>${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 674e9631..e7c424b8 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -694,3 +694,47 @@ 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:4377 +Candidate operations found: 1 +------------------------------------- +Operation n°1: + +PROJ:EPSG_5613_TO_EPSG_4377, 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]]]], + TARGETCRS[ + GEOGCRS["SWEREF99 (3D)", + 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 minute second hemisphere",0.0174532925199433]], + AXIS["geodetic longitude (Long)",east, + ORDER[2], + ANGLEUNIT["degree minute second hemisphere",0.0174532925199433]], + AXIS["ellipsoidal height (h)",up, + ORDER[3], + LENGTHUNIT["metre",1]]]], + 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_4377"]] + -- cgit v1.2.3 From 5c691e7fec7c244b1a1a6b5ef97df2cf69e403df Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 21 Feb 2019 01:04:55 +0100 Subject: projinfo: add information about missing grids --- test/cli/testprojinfo | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index e39e2193..c78da8fd 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -29,6 +29,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} -- cgit v1.2.3 From 34168532d3f3773e1afa2e560bdfba9bd369a0aa Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 21 Feb 2019 12:47:38 +0100 Subject: Geog2D+Height -> Geog3D of same datum: avoid inserting a useless ballpark horizontal transformation --- test/cli/testprojinfo | 4 ++++ test/cli/testprojinfo_out.dist | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index c78da8fd..0f987850 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -108,6 +108,10 @@ echo "Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4377" >> $EXE -s EPSG:5613 -t EPSG:4377 >>${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} + # 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 e7c424b8..b22766d9 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -738,3 +738,21 @@ COORDINATEOPERATION["RH2000 height to SWEREF99", BBOX[55.28,10.93,69.07,24.17]], ID["PROJ","EPSG_5613_TO_EPSG_4377"]] +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 + -- cgit v1.2.3 From 410631e5a25ae88f81545393240da86722f289f9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 22 Feb 2019 12:38:24 +0100 Subject: proj.db: tune so that 'NGF IGN69 height to RGF93' uses the RAF09.gtx grid --- test/cli/testprojinfo | 4 ++++ test/cli/testprojinfo_out.dist | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index 0f987850..08ec9ce4 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -112,6 +112,10 @@ echo "Testing NAD83(2011) + NAVD88 height -> NAD83(2011) : projinfo -s EPSG:6349 $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 b22766d9..a2e2cab9 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -756,3 +756,29 @@ 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)):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°2: + +INVERSE(EPSG):8885, Inverse of RGF93 to NGF IGN69 height (3), 0.01 m, France - mainland onshore + +PROJ string: ++proj=pipeline +step +inv +proj=vgridshift +grids=RAF18.tac +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 + -- cgit v1.2.3 From 140c64713b451db3456287e338e1ce297a52d047 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 24 Feb 2019 08:02:45 -0500 Subject: Fix data path used by cli tests (#1288) All other tests use PROJ_LIB, and allow it to be overridden from the command-line, so do the same here. --- test/cli/Makefile.am | 20 ++++++++++---------- test/cli/test27 | 7 +++++-- test/cli/test83 | 7 +++++-- test/cli/testIGNF | 3 +-- test/cli/testcct | 1 - test/cli/testdatumfile | 1 - test/cli/testflaky | 1 - test/cli/testntv2 | 1 - test/cli/testprojinfo | 1 - test/cli/testvarious | 3 +-- 10 files changed, 22 insertions(+), 23 deletions(-) (limited to 'test/cli') 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..421f9044 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" # diff --git a/test/cli/test83 b/test/cli/test83 index 82b491a7..59793870 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" # diff --git a/test/cli/testIGNF b/test/cli/testIGNF index 0fa04e84..2b2d5a57 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 "============================================" 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..27c39840 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() diff --git a/test/cli/testflaky b/test/cli/testflaky index af56a9cd..0b823cf6 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() diff --git a/test/cli/testntv2 b/test/cli/testntv2 index e82026fc..50b5d0ca 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() diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index 08ec9ce4..244e1bd5 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() diff --git a/test/cli/testvarious b/test/cli/testvarious index c1fa61df..43b1f63c 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 -- cgit v1.2.3 From 2622d3851573cd44fc7b36bfd15f07215f434d4b Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Mon, 18 Mar 2019 23:58:41 +1300 Subject: Normalize CMake with cmakelint, 2-space indent --- test/cli/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/cli') 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) -- cgit v1.2.3 From 10e1b7b75f70c704cf78a7eb7197beebb4b82d4a Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 24 Mar 2019 11:35:16 +0100 Subject: Make cs2cs support 4D coordinates. This is a bit of a hack, 4D coordinates *will* be written to STDOUT but the output format speficied with -f is not respected for the t component, rather it is forward verbatim from the input. Fixes #1354 --- test/cli/testvarious | 13 +++++++++++++ test/cli/tv_out.dist | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testvarious b/test/cli/testvarious index 43b1f63c..afe52ade 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -953,6 +953,19 @@ $EXE EPSG:32631 EPSG:4326 -E >> ${OUT} <> ${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} < Date: Mon, 25 Mar 2019 12:44:05 +0100 Subject: WKT2_2018: always export ID in base crs node, even if there is one on upper node This is a particular logic allowed by paragraph 7.3.3 Identifier of OGC 18-010r6 --- test/cli/testprojinfo_out.dist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index a2e2cab9..ee9aeca7 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -633,7 +633,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]], -- cgit v1.2.3 From 09db4826d4a1e5df900cb4b93a4b3eae2c487cb9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 13:56:43 +0100 Subject: WKT2_2018: always export ID of SOURCECRS/TARGETCRS and STEPs even if there is one on upper node This is a particular logic allowed by paragraph 7.3.3 Identifier of OGC 18-010r6 --- test/cli/testprojinfo_out.dist | 58 ++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 30 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index ee9aeca7..eaa10689 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -193,10 +193,6 @@ COORDINATEOPERATION["Ballpark 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", @@ -212,10 +208,6 @@ COORDINATEOPERATION["Ballpark 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]], @@ -265,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", @@ -279,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"], @@ -313,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", @@ -327,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"], @@ -361,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", @@ -375,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], @@ -408,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", @@ -422,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], @@ -455,7 +455,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", @@ -469,7 +470,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",4269]]], METHOD["NTv1", ID["EPSG",9614]], PARAMETERFILE["Latitude and longitude difference file","GS2783v1.QUE"], @@ -503,7 +505,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", @@ -517,7 +520,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",4269]]], METHOD["NTv2", ID["EPSG",9615]], PARAMETERFILE["Latitude and longitude difference file","QUE27-83.gsb"], @@ -552,10 +556,6 @@ COORDINATEOPERATION["Ballpark 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", @@ -571,10 +571,6 @@ COORDINATEOPERATION["Ballpark 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]], @@ -712,7 +708,8 @@ COORDINATEOPERATION["RH2000 height to SWEREF99", VDATUM["Rikets hojdsystem 2000"], CS[vertical,1], AXIS["gravity-related height (H)",up, - LENGTHUNIT["metre",1]]]], + LENGTHUNIT["metre",1]], + ID["EPSG",5613]]], TARGETCRS[ GEOGCRS["SWEREF99 (3D)", DATUM["SWEREF99", @@ -729,7 +726,8 @@ COORDINATEOPERATION["RH2000 height to SWEREF99", ANGLEUNIT["degree minute second hemisphere",0.0174532925199433]], AXIS["ellipsoidal height (h)",up, ORDER[3], - LENGTHUNIT["metre",1]]]], + LENGTHUNIT["metre",1]], + ID["EPSG",4377]]], METHOD["GravityRelatedHeight to Geographic3D", ID["PROJ","HEIGHT_TO_GEOGRAPHIC3D"]], PARAMETERFILE["Geoid (height correction) model file","SWEN17_RH2000.gtx"], -- cgit v1.2.3 From 054d02760db6fc2c33889d577cd671baa8807909 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 17:00:04 +0100 Subject: Database: add operation_version column to coordinate operation tables --- test/cli/testprojinfo_out.dist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index eaa10689..3e82125b 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -442,6 +442,7 @@ PROJ string: WKT2_2018 string: COORDINATEOPERATION["NAD27 to NAD83 (5)", + VERSION["SGQ-Can QC NT1"], SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", @@ -492,6 +493,7 @@ PROJ string: WKT2_2018 string: COORDINATEOPERATION["NAD27 to NAD83 (6)", + VERSION["SGQ-Can QC NT2"], SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", -- cgit v1.2.3 From ed0636425083034b55633402108b85bc765ae0eb Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 18:29:39 +0100 Subject: Database: add link from RAF18.tac to RAF18.gtx --- test/cli/testprojinfo_out.dist | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 3e82125b..8698d6c1 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -762,18 +762,18 @@ Candidate operations found: 3 ------------------------------------- Operation n°1: -INVERSE(DERIVED_FROM(EPSG)):8371, Inverse of RGF93 to NGF IGN69 height (2), 0.02 m, France - mainland onshore +INVERSE(DERIVED_FROM(EPSG)):8885, Inverse of RGF93 to NGF IGN69 height (3), 0.01 m, France - mainland onshore PROJ string: -+proj=vgridshift +grids=RAF09.gtx +multiplier=1 ++proj=vgridshift +grids=RAF18.gtx +multiplier=1 ------------------------------------- Operation n°2: -INVERSE(EPSG):8885, Inverse of RGF93 to NGF IGN69 height (3), 0.01 m, France - mainland onshore +INVERSE(DERIVED_FROM(EPSG)):8371, Inverse of RGF93 to NGF IGN69 height (2), 0.02 m, France - mainland onshore PROJ string: -+proj=pipeline +step +inv +proj=vgridshift +grids=RAF18.tac +multiplier=1 ++proj=vgridshift +grids=RAF09.gtx +multiplier=1 ------------------------------------- Operation n°3: -- cgit v1.2.3 From 47dd4dbc40cbba140f4ceb775ea5d5d628fba961 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 28 Mar 2019 22:12:32 +0100 Subject: Adopt use of the noop conversion in ISO19111 code --- test/cli/testprojinfo_out.dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index 8698d6c1..f5cbb8bf 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -175,7 +175,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", @@ -540,7 +540,7 @@ Operation n°7: 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", -- cgit v1.2.3 From 2c28ca1798cb24b803c44ceebd34bb3f15822c87 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Fri, 5 Apr 2019 12:56:58 +1300 Subject: Adjust test outputs - Tests should use unified diff with expected results - Show CMake build compile commands (VERBOSE=1) - Travis CI only has two cores, so "-j2" is sufficent --- test/cli/test27 | 2 +- test/cli/test83 | 2 +- test/cli/testIGNF | 2 +- test/cli/testdatumfile | 2 +- test/cli/testflaky | 2 +- test/cli/testntv2 | 2 +- test/cli/testvarious | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'test/cli') diff --git a/test/cli/test27 b/test/cli/test27 index 421f9044..bfc1cb0a 100755 --- a/test/cli/test27 +++ b/test/cli/test27 @@ -836,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 59793870..cfb1365e 100755 --- a/test/cli/test83 +++ b/test/cli/test83 @@ -717,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 2b2d5a57..aa8c3354 100755 --- a/test/cli/testIGNF +++ b/test/cli/testIGNF @@ -158,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/testdatumfile b/test/cli/testdatumfile index 27c39840..5b56f077 100755 --- a/test/cli/testdatumfile +++ b/test/cli/testdatumfile @@ -113,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 0b823cf6..23580146 100755 --- a/test/cli/testflaky +++ b/test/cli/testflaky @@ -58,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 50b5d0ca..73371dbe 100755 --- a/test/cli/testntv2 +++ b/test/cli/testntv2 @@ -57,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/testvarious b/test/cli/testvarious index afe52ade..7b4a47f3 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -969,7 +969,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" -- cgit v1.2.3 From 3faaf339216f128be7a8bb354e858203e5ec6d7f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 22 Apr 2019 15:26:43 +0200 Subject: Database: use non-deprecated code for SWEREF99 for 'RH2000 height to SWEREF99' transformation --- test/cli/testprojinfo | 4 ++-- test/cli/testprojinfo_out.dist | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'test/cli') diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo index 244e1bd5..d8569a76 100755 --- a/test/cli/testprojinfo +++ b/test/cli/testprojinfo @@ -103,8 +103,8 @@ 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:4377" >> ${OUT} -$EXE -s EPSG:5613 -t EPSG:4377 >>${OUT} 2>&1 +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} diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist index f5cbb8bf..ea0f4983 100644 --- a/test/cli/testprojinfo_out.dist +++ b/test/cli/testprojinfo_out.dist @@ -693,12 +693,12 @@ 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:4377 +Testing RH2000 height to SWEREF99: projinfo -s EPSG:5613 -t EPSG:4977 Candidate operations found: 1 ------------------------------------- Operation n°1: -PROJ:EPSG_5613_TO_EPSG_4377, RH2000 height to SWEREF99, unknown accuracy, Sweden - onshore +PROJ:EPSG_5613_TO_EPSG_4977, RH2000 height to SWEREF99, unknown accuracy, Sweden - onshore PROJ string: +proj=vgridshift +grids=SWEN17_RH2000.gtx +multiplier=1 @@ -713,7 +713,7 @@ COORDINATEOPERATION["RH2000 height to SWEREF99", LENGTHUNIT["metre",1]], ID["EPSG",5613]]], TARGETCRS[ - GEOGCRS["SWEREF99 (3D)", + GEOGCRS["SWEREF99", DATUM["SWEREF99", ELLIPSOID["GRS 1980",6378137,298.257222101, LENGTHUNIT["metre",1]]], @@ -722,14 +722,14 @@ COORDINATEOPERATION["RH2000 height to SWEREF99", CS[ellipsoidal,3], AXIS["geodetic latitude (Lat)",north, ORDER[1], - ANGLEUNIT["degree minute second hemisphere",0.0174532925199433]], - AXIS["geodetic longitude (Long)",east, + ANGLEUNIT["degree",0.0174532925199433]], + AXIS["geodetic longitude (Lon)",east, ORDER[2], - ANGLEUNIT["degree minute second hemisphere",0.0174532925199433]], + ANGLEUNIT["degree",0.0174532925199433]], AXIS["ellipsoidal height (h)",up, ORDER[3], LENGTHUNIT["metre",1]], - ID["EPSG",4377]]], + ID["EPSG",4977]]], METHOD["GravityRelatedHeight to Geographic3D", ID["PROJ","HEIGHT_TO_GEOGRAPHIC3D"]], PARAMETERFILE["Geoid (height correction) model file","SWEN17_RH2000.gtx"], @@ -737,7 +737,7 @@ COORDINATEOPERATION["RH2000 height to SWEREF99", SCOPE["unknown"], AREA["Sweden - onshore"], BBOX[55.28,10.93,69.07,24.17]], - ID["PROJ","EPSG_5613_TO_EPSG_4377"]] + 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 -- cgit v1.2.3 From c5346c7c25ca9fe281df39eaeefebc1aa4009266 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 3 May 2019 20:54:42 +0200 Subject: cs2cs: set time value to HUGE_VAL if not explicitly specified --- test/cli/testvarious | 10 ++++++++++ test/cli/tv_out.dist | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'test/cli') diff --git a/test/cli/testvarious b/test/cli/testvarious index 7b4a47f3..2e2d854c 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -966,6 +966,16 @@ $EXE -f %.4f EPSG:4896 EPSG:7930 -E >> ${OUT} <> ${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} <