aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-11-02 23:38:41 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-11-02 23:38:41 +0100
commit0923704ba34100643b7bce270c332fa2c430224c (patch)
tree93b326ab6bdd73e60807391ed683eed60447e803 /test
parent7492e65bfebadfcd44d3e2e4916a9d19e4bc6ae2 (diff)
downloadPROJ-0923704ba34100643b7bce270c332fa2c430224c.tar.gz
PROJ-0923704ba34100643b7bce270c332fa2c430224c.zip
Database: add mapping between EPSG geoid and PROJ grid names for GEOID99, 03, 06, 09 and 18. Related to https://github.com/OSGeo/proj-datumgrid/pull/60 that add those grids in proj-datumgrid-north-america
Diffstat (limited to 'test')
-rw-r--r--test/cli/testprojinfo_out.dist14
-rw-r--r--test/unit/test_operation.cpp48
2 files changed, 15 insertions, 47 deletions
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 40b8330a..2875626b 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -947,14 +947,14 @@ COORDINATEOPERATION["RH2000 height to SWEREF99",
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: 3
+Candidate operations found: 2
-------------------------------------
Operation n°1:
-unknown id, Inverse of NAD83(2011) to NAVD88 height (1), 0.02 m, USA - CONUS - onshore
+unknown id, Inverse of NAD83(2011) to NAVD88 height (3), 0.015 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
++proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=vgridshift +grids=g2018u0.gtx +multiplier=1 +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
-------------------------------------
Operation n°2:
@@ -964,14 +964,6 @@ unknown id, Inverse of NAD83(2011) to NAVD88 height (2), 0.02 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
--------------------------------------
-Operation n°3:
-
-unknown id, Inverse of NAD83(2011) to NAVD88 height (3), 0.015 m, USA - CONUS - onshore
-
-PROJ string:
-+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +inv +proj=vgridshift +grids=g2018u0.bin +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: 2
-------------------------------------
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index 5e04bf23..328a04cc 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -7029,17 +7029,13 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
"+proj=pipeline "
"+step +proj=axisswap +order=2,1 "
"+step +proj=unitconvert +xy_in=deg +xy_out=rad "
- // Inv here since the grid is not known
- "+step +inv +proj=vgridshift +grids=geoid09_conus.bin "
+ "+step +proj=vgridshift +grids=geoid09_conus.gtx "
"+multiplier=1 "
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
"+step +proj=axisswap +order=2,1");
}
- // CompoundCRS to Geog3DCRS, with same vertical unit, and with
- // ellipsoid height <--> vertical height correction that requires a
- // horizontal adjustment before and after (which is empty in practice here
- // as NAD83 to NAD83(2011) is no-op)
+ // NAD83 + NAVD88 height --> WGS 84
{
auto ctxt =
CoordinateOperationContext::create(authFactory, nullptr, 0.0);
@@ -7062,10 +7058,10 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
ASSERT_GE(list.size(), 2U);
EXPECT_EQ(list[0]->nameStr(),
- "NAD83 to NAD83(2011) (1) + "
- "Inverse of NAD83(2011) to NAVD88 height (1) + "
- "Inverse of NAD83 to NAD83(2011) (1) + "
- "NAD83 to WGS 84 (1)");
+ "NAD83 to WGS 84 (1) + "
+ "Inverse of NAD83(NSRS2007) to WGS 84 (1) + "
+ "Inverse of NAD83(NSRS2007) to NAVD88 height (1) + "
+ "NAD83(NSRS2007) to WGS 84 (1)");
EXPECT_EQ(list[0]->exportToPROJString(
PROJStringFormatter::create(
PROJStringFormatter::Convention::PROJ_5,
@@ -7074,28 +7070,8 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
"+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");
-
- // Shows vertical step, and then horizontal step
- EXPECT_EQ(list[1]->nameStr(),
- "NAD83 to NAD83(2011) (1) + "
- "Inverse of NAD83(2011) to NAVD88 height (1) + "
- "Inverse of NAD83 to NAD83(2011) (1) + "
- "NAD83 to WGS 84 (18)");
- EXPECT_EQ(list[1]->exportToPROJString(
- PROJStringFormatter::create(
- PROJStringFormatter::Convention::PROJ_5,
- authFactory->databaseContext())
- .get()),
- "+proj=pipeline "
- "+step +proj=axisswap +order=2,1 "
- "+step +proj=unitconvert +xy_in=deg +xy_out=rad "
- "+step +proj=vgridshift +grids=g2012bu0.gtx "
+ "+step +proj=vgridshift +grids=geoid09_conus.gtx "
"+multiplier=1 "
- "+step +proj=hgridshift +grids=FL "
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
"+step +proj=axisswap +order=2,1");
}
@@ -7123,7 +7099,7 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
ASSERT_GE(list.size(), 2U);
EXPECT_EQ(list[0]->nameStr(),
- "Inverse of NAD83(2011) to NAVD88 height (1) + "
+ "Inverse of NAD83(2011) to NAVD88 height (3) + "
"Inverse of NAD83 to NAD83(2011) (1) + "
"NAD83 to WGS 84 (1)");
EXPECT_EQ(list[0]->exportToPROJString(
@@ -7134,14 +7110,14 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
"+proj=pipeline "
"+step +proj=axisswap +order=2,1 "
"+step +proj=unitconvert +xy_in=deg +xy_out=rad "
- "+step +proj=vgridshift +grids=g2012bu0.gtx "
+ "+step +proj=vgridshift +grids=g2018u0.gtx "
"+multiplier=1 "
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
"+step +proj=axisswap +order=2,1");
// Shows vertical step, and then horizontal step
EXPECT_EQ(list[1]->nameStr(),
- "Inverse of NAD83(2011) to NAVD88 height (1) + "
+ "Inverse of NAD83(2011) to NAVD88 height (3) + "
"Inverse of NAD83 to NAD83(2011) (1) + "
"NAD83 to WGS 84 (18)");
EXPECT_EQ(list[1]->exportToPROJString(
@@ -7152,7 +7128,7 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
"+proj=pipeline "
"+step +proj=axisswap +order=2,1 "
"+step +proj=unitconvert +xy_in=deg +xy_out=rad "
- "+step +proj=vgridshift +grids=g2012bu0.gtx "
+ "+step +proj=vgridshift +grids=g2018u0.gtx "
"+multiplier=1 "
"+step +proj=hgridshift +grids=FL "
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
@@ -7184,7 +7160,7 @@ TEST(operation, compoundCRS_to_geogCRS_2D_promote_to_3D_context) {
ctxt);
// The checked value is not that important, but in case this changes,
// likely due to a EPSG upgrade, worth checking
- ASSERT_EQ(listCompoundToGeog2D.size(), 469U);
+ ASSERT_EQ(listCompoundToGeog2D.size(), 467U);
auto listGeog2DToCompound =
CoordinateOperationFactory::create()->createOperations(dst, nnSrc,