aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-09-16 12:01:39 +0200
committerGitHub <noreply@github.com>2021-09-16 12:01:39 +0200
commita3e412995df7dae2c8ef13d2682e03b770edcb75 (patch)
tree751cd21521ee33e002222b165c1938990d1b0bac /test
parente54739954db813cd8394066b1e64ae8f2dd76bd8 (diff)
parent85f496b26702bf6566296072795e821d70156c09 (diff)
downloadPROJ-a3e412995df7dae2c8ef13d2682e03b770edcb75.tar.gz
PROJ-a3e412995df7dae2c8ef13d2682e03b770edcb75.zip
Merge pull request #2851 from rouault/epsg_10_035
Database: update to EPSG v10.035
Diffstat (limited to 'test')
-rwxr-xr-xtest/cli/testprojinfo4
-rw-r--r--test/cli/testprojinfo_out.dist8
-rwxr-xr-xtest/cli/testvarious11
-rw-r--r--test/cli/tv_out.dist7
-rw-r--r--test/unit/test_c_api.cpp13
-rw-r--r--test/unit/test_crs.cpp16
-rw-r--r--test/unit/test_factory.cpp2
-rw-r--r--test/unit/test_io.cpp2
-rw-r--r--test/unit/test_operationfactory.cpp48
9 files changed, 51 insertions, 60 deletions
diff --git a/test/cli/testprojinfo b/test/cli/testprojinfo
index 3081966b..2f8c1de5 100755
--- a/test/cli/testprojinfo
+++ b/test/cli/testprojinfo
@@ -372,8 +372,8 @@ $EXE --list-crs projected --bbox -100,40,-90,41 --spatial-test intersects | grep
echo "" >>${OUT}
# Test case where --area has several matches
-echo 'Testing --list-crs projected --area France | grep "RGF93 / Lambert-93\|UTM zone 11N" | sort' >> ${OUT}
-$EXE --list-crs projected --area France | grep "RGF93 / Lambert-93\|UTM zone 11N" | sort >> ${OUT}
+echo 'Testing --list-crs projected --area France | grep "RGF93 v1 / Lambert-93\|UTM zone 11N" | sort' >> ${OUT}
+$EXE --list-crs projected --area France | grep "RGF93 v1 / Lambert-93\|UTM zone 11N" | sort >> ${OUT}
echo "" >>${OUT}
# do 'diff' with distribution results
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 2405462d..2cb30c63 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -1155,7 +1155,7 @@ Candidate operations found: 2
-------------------------------------
Operation No. 1:
-INVERSE(DERIVED_FROM(EPSG)):8885, Inverse of RGF93 to NGF-IGN69 height (3), 0.01 m, France - mainland onshore.
+INVERSE(DERIVED_FROM(EPSG)):10000, Inverse of RGF93 v1 to NGF-IGN69 height (1), 0.5 m, France - mainland onshore.
PROJ string:
+proj=pipeline
@@ -1168,7 +1168,7 @@ PROJ string:
-------------------------------------
Operation No. 2:
-unknown id, Transformation from NGF-IGN69 height to RGF93 (ballpark vertical transformation, without ellipsoid height to vertical height correction), unknown accuracy, World, has ballpark transformation
+unknown id, Transformation from NGF-IGN69 height to RGF93 v1 (ballpark vertical transformation, without ellipsoid height to vertical height correction), unknown accuracy, World, has ballpark transformation
PROJ string:
+proj=noop
@@ -1662,6 +1662,6 @@ ESRI:104010 "GCS_IGS08" [deprecated]
Testing --list-crs projected --bbox -100,40,-90,41 --spatial-test intersects | grep "(2011).*Missouri East\|York" | sort
EPSG:6512 "NAD83(2011) / Missouri East"
-Testing --list-crs projected --area France | grep "RGF93 / Lambert-93\|UTM zone 11N" | sort
-EPSG:2154 "RGF93 / Lambert-93"
+Testing --list-crs projected --area France | grep "RGF93 v1 / Lambert-93\|UTM zone 11N" | sort
+EPSG:2154 "RGF93 v1 / Lambert-93"
diff --git a/test/cli/testvarious b/test/cli/testvarious
index 80340369..cbfb2d55 100755
--- a/test/cli/testvarious
+++ b/test/cli/testvarious
@@ -1011,14 +1011,13 @@ EOF
echo "##############################################################" >> ${OUT}
echo "Test effect of --authority (https://github.com/OSGeo/PROJ/issues/2442)" >> ${OUT}
-echo "This test might be a bit fragile if proj.db content changes" >> ${OUT}
-echo "The first result should use the 'WGS_1984_(ITRF08)_To_NAD_1983_2011' (ESRI:108363) operation" >> ${OUT}
+echo "The first result should use the EPSG:8076 operation" >> ${OUT}
echo "and the second one a no-op" >> ${OUT}
-$EXE -E +proj=latlong +datum=WGS84 +no_defs +to +init=epsg:6342 >> ${OUT} <<EOF
--105 40
+$EXE -E ITRF96 ITRF2014 >> ${OUT} <<EOF
+49 2
EOF
-$EXE --authority EPSG -E +proj=latlong +datum=WGS84 +no_defs +to +init=epsg:6342 >> ${OUT} <<EOF
--105 40
+$EXE --authority PROJ -E ITRF96 ITRF2014 >> ${OUT} <<EOF
+49 2
EOF
echo "##############################################################" >> ${OUT}
diff --git a/test/cli/tv_out.dist b/test/cli/tv_out.dist
index 06aa1a2d..a0009dab 100644
--- a/test/cli/tv_out.dist
+++ b/test/cli/tv_out.dist
@@ -487,11 +487,10 @@ Test Colombia Urban
4.8 -74.25 122543.174 80859.033 0.000
##############################################################
Test effect of --authority (https://github.com/OSGeo/PROJ/issues/2442)
-This test might be a bit fragile if proj.db content changes
-The first result should use the 'WGS_1984_(ITRF08)_To_NAD_1983_2011' (ESRI:108363) operation
+The first result should use the EPSG:8076 operation
and the second one a no-op
--105 40 500000.86 4427756.50 0.00
--105 40 500000.00 4427757.22 0.00
+49 2 49d0'0.002"N 2dE 0.018
+49 2 49dN 2dE 0.000
##############################################################
Test effect of --accuracy
##############################################################
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index 600f47ff..4898345c 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -5033,13 +5033,12 @@ TEST_F(CApi, proj_create_vertical_crs_ex_with_geog_crs) {
auto name = proj_get_name(P);
ASSERT_TRUE(name != nullptr);
- EXPECT_EQ(
- name,
- std::string("Inverse of UTM zone 11N + "
- "Ballpark geographic offset from NAD83(2011) to WGS 84 + "
- "Conversion from myVertCRS to myVertCRS (metre) + "
- "Transformation from myVertCRS (metre) to WGS 84 + "
- "Ballpark geographic offset from WGS 84 to NAD83(2011)"));
+ EXPECT_EQ(name,
+ std::string("Inverse of UTM zone 11N + "
+ "NAD83(2011) to WGS 84 (1) + "
+ "Conversion from myVertCRS to myVertCRS (metre) + "
+ "Transformation from myVertCRS (metre) to WGS 84 + "
+ "Inverse of NAD83(2011) to WGS 84 (1)"));
auto proj_5 = proj_as_proj_string(m_ctxt, P, PJ_PROJ_5, nullptr);
ASSERT_NE(proj_5, nullptr);
diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp
index 2ac26d3a..42e6018b 100644
--- a/test/unit/test_crs.cpp
+++ b/test/unit/test_crs.cpp
@@ -2911,9 +2911,14 @@ TEST(crs, projectedCRS_identify_db) {
ASSERT_TRUE(crs != nullptr);
auto factoryAll = AuthorityFactory::create(dbContext, std::string());
auto res = crs->identify(factoryAll);
- ASSERT_GE(res.size(), 1U);
- EXPECT_EQ(res.front().first->getEPSGCode(), 2154);
- EXPECT_EQ(res.front().second, 90);
+ bool found = false;
+ for (const auto &candidate : res) {
+ if (candidate.first->getEPSGCode() == 2154) {
+ found = true;
+ EXPECT_EQ(candidate.second, 90);
+ }
+ }
+ EXPECT_TRUE(found);
}
{
// Identify with DatumEnsemble
@@ -6034,6 +6039,10 @@ TEST(crs, crs_createBoundCRSToWGS84IfPossible) {
"+proj=longlat +datum=WGS84 +geoidgrids=us_nga_egm08_25.tif "
"+vunits=m +no_defs +type=crs");
}
+#ifdef disabled_since_epsg_10_035
+ // There are now too many transformations from NGF-IGN69 height to WGS 84
+ // for createBoundCRSToWGS84IfPossible() to be able to select a
+ // vertical geoidgrid
{
// NTF (Paris) / Lambert zone II + NGF-IGN69 height
auto crs_7421 = factory->createCoordinateReferenceSystem("7421");
@@ -6053,6 +6062,7 @@ TEST(crs, crs_createBoundCRSToWGS84IfPossible) {
"+towgs84=-168,-60,320,0,0,0,0 +units=m "
"+geoidgrids=fr_ign_RAF18.tif +vunits=m +no_defs +type=crs");
}
+#endif
{
auto crs = createVerticalCRS();
EXPECT_EQ(crs->createBoundCRSToWGS84IfPossible(
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index 32afe0b5..1ecea9d6 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -1552,7 +1552,7 @@ TEST(factory, AuthorityFactory_getDescriptionText) {
EXPECT_THROW(factory->getDescriptionText("-1"),
NoSuchAuthorityCodeException);
EXPECT_EQ(factory->getDescriptionText("10000"),
- "RGF93 to NGF-IGN69 height (1)");
+ "RGF93 v1 to NGF-IGN69 height (1)");
// Several objects have 4326 code, including an area of use, but return
// the CRS one.
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index a4fb5f6e..ed059fe3 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -6389,7 +6389,7 @@ TEST(wkt_parse, wkt1_oracle) {
auto res = crs->identify(factoryAll);
ASSERT_GE(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2154);
- EXPECT_EQ(res.front().second, 100);
+ EXPECT_EQ(res.front().second, 90);
}
// ---------------------------------------------------------------------------
diff --git a/test/unit/test_operationfactory.cpp b/test/unit/test_operationfactory.cpp
index b50542c6..2ee5a53c 100644
--- a/test/unit/test_operationfactory.cpp
+++ b/test/unit/test_operationfactory.cpp
@@ -880,7 +880,7 @@ TEST(operation, geogCRS_to_geogCRS_context_concatenated_operation) {
ctxt);
ASSERT_EQ(list.size(), 4U);
- EXPECT_EQ(list[0]->nameStr(), "NTF (Paris) to RGF93 (1)");
+ EXPECT_EQ(list[0]->nameStr(), "NTF (Paris) to RGF93 v1 (1)");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline "
"+step +proj=axisswap +order=2,1 "
@@ -895,7 +895,7 @@ TEST(operation, geogCRS_to_geogCRS_context_concatenated_operation) {
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
"+step +proj=axisswap +order=2,1");
- EXPECT_EQ(list[1]->nameStr(), "NTF (Paris) to RGF93 (2)");
+ EXPECT_EQ(list[1]->nameStr(), "NTF (Paris) to RGF93 v1 (2)");
EXPECT_EQ(list[1]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
"+proj=unitconvert +xy_in=grad +xy_out=rad +step +inv "
@@ -1485,7 +1485,7 @@ TEST(operation, geogCRS_3D_to_geogCRS_3D_different_datum_context) {
ctxt);
ASSERT_GE(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
- "RGF93 to ETRS89 (1) + Inverse of CH1903+ to ETRS89 (1)");
+ "RGF93 v1 to ETRS89 (1) + Inverse of CH1903+ to ETRS89 (1)");
// Check that there is no +push +v_3
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline "
@@ -1526,8 +1526,8 @@ TEST(operation, geocentric_to_geogCRS_3D_different_datum_context) {
ctxt);
ASSERT_GE(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
- "Conversion from RGF93 (geocentric) to RGF93 (geog3D) + "
- "RGF93 to ETRS89 (1) + "
+ "Conversion from RGF93 v1 (geocentric) to RGF93 v1 (geog3D) + "
+ "RGF93 v1 to ETRS89 (1) + "
"Inverse of CH1903+ to ETRS89 (1)");
// Check that there is no +push +v_3
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
@@ -3759,7 +3759,7 @@ TEST(operation,
if (op->nameStr() ==
"Inverse of unnamed + "
"Transformation from NAD83 to WGS84 + "
- "Ballpark geographic offset from WGS 84 to NAD83(2011) + "
+ "Inverse of NAD83(2011) to WGS 84 (1) + "
"Conversion from NAVD88 height (ftUS) to NAVD88 height + "
"Inverse of NAD83(2011) to NAVD88 height (1) + "
"Conversion from NAD83(2011) (geog3D) to NAD83(2011) "
@@ -4834,9 +4834,8 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
"Geoid09 hybrid model. Replaced by 2012 model (CT code 6326)."
"\n"
"For NAD83(NSRS2007) to WGS 84 (1) (EPSG:15931): "
- "Approximation at the +/- 1m level assuming that "
- "NAD83(NSRS2007) is equivalent to WGS 84 within the accuracy "
- "of the transformation.");
+ "Approximation assuming that NAD83(NSRS2007) is equivalent "
+ "to WGS 84 within the accuracy of the transformation.");
}
// NAD83 + NAVD88 height --> WGS 84
@@ -4898,14 +4897,14 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
auto list = CoordinateOperationFactory::create()->createOperations(
nnSrc,
- authFactory->createCoordinateReferenceSystem("4979"), // WGS 84
+ authFactory->createCoordinateReferenceSystem("4985"), // WGS 72 3D
ctxt);
- ASSERT_GE(list.size(), 2U);
+ ASSERT_GE(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Inverse of NAD83(2011) to NAVD88 height (3) + "
- "Inverse of NAD83 to NAD83(2011) (1) + "
- "NAD83 to WGS 84 (1)");
+ "NAD83(2011) to WGS 84 (1) + "
+ "Inverse of WGS 72 to WGS 84 (2)");
EXPECT_EQ(list[0]->exportToPROJString(
PROJStringFormatter::create(
PROJStringFormatter::Convention::PROJ_5,
@@ -4916,25 +4915,10 @@ TEST(operation, compoundCRS_to_geogCRS_3D_context) {
"+step +proj=unitconvert +xy_in=deg +xy_out=rad "
"+step +proj=vgridshift +grids=us_noaa_g2018u0.tif "
"+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 (3) + "
- "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=us_noaa_g2018u0.tif "
- "+multiplier=1 "
- "+step +proj=hgridshift +grids=us_noaa_FL.tif "
+ "+step +proj=cart +ellps=WGS84 "
+ "+step +inv +proj=helmert +x=0 +y=0 +z=4.5 +rx=0 +ry=0 "
+ "+rz=0.554 +s=0.219 +convention=position_vector "
+ "+step +inv +proj=cart +ellps=WGS72 "
"+step +proj=unitconvert +xy_in=rad +xy_out=deg "
"+step +proj=axisswap +order=2,1");
}