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') 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') 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') 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 287230f86d89a26574c777bb5e5b498084a84897 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 21 Feb 2019 13:48:28 +0100 Subject: Transformation: reintroduce the term of 'Null geographic offset' for transformations between geographic CRS of same datum (typically 3D to 2D) --- test/unit/test_operation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index 112b46e3..e71ac716 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -4507,8 +4507,7 @@ TEST(operation, geogCRS_to_geogCRS_noop) { auto op = CoordinateOperationFactory::create()->createOperation( GeographicCRS::EPSG_4326, GeographicCRS::EPSG_4326); ASSERT_TRUE(op != nullptr); - EXPECT_EQ(op->nameStr(), - "Ballpark geographic offset from WGS 84 to WGS 84"); + EXPECT_EQ(op->nameStr(), "Null geographic offset from WGS 84 to WGS 84"); EXPECT_EQ(op->exportToPROJString(PROJStringFormatter::create().get()), ""); EXPECT_EQ(op->inverse()->nameStr(), op->nameStr()); } -- cgit v1.2.3