aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cli/testprojinfo_out.dist4
-rw-r--r--test/unit/test_c_api.cpp55
-rw-r--r--test/unit/test_factory.cpp2
3 files changed, 47 insertions, 14 deletions
diff --git a/test/cli/testprojinfo_out.dist b/test/cli/testprojinfo_out.dist
index 17390534..9e03b003 100644
--- a/test/cli/testprojinfo_out.dist
+++ b/test/cli/testprojinfo_out.dist
@@ -964,7 +964,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)):8885, Inverse of RGF93 to NGF-IGN69 height (3), 0.01 m, France - mainland onshore
PROJ string:
+proj=vgridshift +grids=fr_ign_RAF18.tif +multiplier=1
@@ -972,7 +972,7 @@ PROJ string:
-------------------------------------
Operation No. 2:
-INVERSE(EPSG):10000, Inverse of RGF93 to NGF IGN69 height (1), 0.5 m, France - mainland onshore
+INVERSE(EPSG):10000, Inverse of RGF93 to NGF-IGN69 height (1), 0.5 m, France - mainland onshore
PROJ string:
+proj=vgridshift +grids=ggf97a.txt +multiplier=1
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index e0473d4f..a294550e 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -3711,22 +3711,39 @@ TEST_F(CApi, proj_coordoperation_create_inverse) {
// ---------------------------------------------------------------------------
TEST_F(CApi, proj_get_remarks) {
- auto co = proj_create_from_database(m_ctxt, "EPSG", "8048",
- PJ_CATEGORY_COORDINATE_OPERATION, false,
- nullptr);
- ObjectKeeper keeper(co);
- ASSERT_NE(co, nullptr);
-
- auto remarks = proj_get_remarks(co);
- ASSERT_NE(remarks, nullptr);
- EXPECT_TRUE(std::string(remarks).find(
- "Scale difference in ppb where 1/billion = 1E-9.") == 0)
- << remarks;
+ // Transformation
+ {
+ auto co = proj_create_from_database(m_ctxt, "EPSG", "8048",
+ PJ_CATEGORY_COORDINATE_OPERATION,
+ false, nullptr);
+ ObjectKeeper keeper(co);
+ ASSERT_NE(co, nullptr);
+
+ auto remarks = proj_get_remarks(co);
+ ASSERT_NE(remarks, nullptr);
+ EXPECT_TRUE(std::string(remarks).find(
+ "Scale difference in ppb where 1/billion = 1E-9.") == 0)
+ << remarks;
+ }
+
+ // Conversion
+ {
+ auto co = proj_create_from_database(m_ctxt, "EPSG", "3811",
+ PJ_CATEGORY_COORDINATE_OPERATION,
+ false, nullptr);
+ ObjectKeeper keeper(co);
+ ASSERT_NE(co, nullptr);
+
+ auto remarks = proj_get_remarks(co);
+ ASSERT_NE(remarks, nullptr);
+ EXPECT_EQ(remarks, std::string("Replaces Lambert 2005."));
+ }
}
// ---------------------------------------------------------------------------
TEST_F(CApi, proj_get_scope) {
+ // Transformation
{
auto co = proj_create_from_database(m_ctxt, "EPSG", "8048",
PJ_CATEGORY_COORDINATE_OPERATION,
@@ -3740,6 +3757,22 @@ TEST_F(CApi, proj_get_scope) {
std::string("Conformal transformation of GDA94 coordinates "
"that have been derived through GNSS CORS."));
}
+
+ // Conversion
+ {
+ auto co = proj_create_from_database(m_ctxt, "EPSG", "3811",
+ PJ_CATEGORY_COORDINATE_OPERATION,
+ false, nullptr);
+ ObjectKeeper keeper(co);
+ ASSERT_NE(co, nullptr);
+
+ auto scope = proj_get_scope(co);
+ ASSERT_NE(scope, nullptr);
+ EXPECT_EQ(scope,
+ std::string("Large and medium scale topographic mapping "
+ "and engineering survey."));
+ }
+
{
auto P = proj_create(m_ctxt, "+proj=noop");
ObjectKeeper keeper(P);
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index e6cfa72b..780bdc9a 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -1371,7 +1371,7 @@ TEST(factory, AuthorityFactory_getDescriptionText) {
EXPECT_THROW(factory->getDescriptionText("-1"),
NoSuchAuthorityCodeException);
EXPECT_EQ(factory->getDescriptionText("10000"),
- "RGF93 to NGF IGN69 height (1)");
+ "RGF93 to NGF-IGN69 height (1)");
// Several objects have 4326 code, including an area of use, but return
// the CRS one.