aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_c_api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_c_api.cpp')
-rw-r--r--test/unit/test_c_api.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index 2e6ea2c7..99904fd4 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -3375,4 +3375,49 @@ TEST_F(CApi, proj_normalize_for_visualization_with_alternatives_reverse) {
EXPECT_NEAR(c.lp.phi, 42, 1e-8);
}
+// ---------------------------------------------------------------------------
+
+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_EQ(
+ remarks,
+ std::string("Scale difference in ppb where 1/billion = 1E-9. "
+ "Derivation excluded Cocos, Christmas and Macquarie "
+ "Islands but is applied there. See codes 8444-46 for "
+ "equivalents using NTv2 method. See code 8447 for "
+ "alternative including distortion model for Aus only."));
+}
+
+// ---------------------------------------------------------------------------
+
+TEST_F(CApi, proj_get_scope) {
+ {
+ auto co = proj_create_from_database(m_ctxt, "EPSG", "8048",
+ 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("Conformal transformation of GDA94 coordinates "
+ "that have been derived through GNSS CORS."));
+ }
+ {
+ auto P = proj_create(m_ctxt, "+proj=noop");
+ ObjectKeeper keeper(P);
+ ASSERT_NE(P, nullptr);
+ auto scope = proj_get_scope(P);
+ ASSERT_EQ(scope, nullptr);
+ }
+}
+
} // namespace