aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-02-21 17:43:19 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-02-21 17:43:19 +0100
commit9cbe9bc5d77310c5d85226bb7f030d6dc847b28f (patch)
treeb48ac00785b9107072de08b2d591e62c3143fe32 /test
parent4d57661a52a2439e4e83c40847afdb14bea2e87b (diff)
parentbbf31d0e1052a40269547d0dec5d63a7e0534ccc (diff)
downloadPROJ-9cbe9bc5d77310c5d85226bb7f030d6dc847b28f.tar.gz
PROJ-9cbe9bc5d77310c5d85226bb7f030d6dc847b28f.zip
Merge branch 'master' into 6.0
Diffstat (limited to 'test')
-rwxr-xr-xtest/cli/testprojinfo10
-rw-r--r--test/cli/testprojinfo_out.dist62
-rw-r--r--test/unit/test_operation.cpp3
3 files changed, 73 insertions, 2 deletions
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index 24a1fdd5..0f987850 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}
@@ -102,6 +104,14 @@ 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}
+
+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 674e9631..b22766d9 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -694,3 +694,65 @@ 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"]]
+
+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
+
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());
}