diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-25 15:59:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-25 15:59:19 +0200 |
| commit | cfdd474dd8aef197297c488c6133f7484fe421fd (patch) | |
| tree | 8105eeac022527c7c35a209f78af8683833c0f58 /test/unit | |
| parent | 5d502d356e16ef81f481eb82dcdeba0ea3ab1f9e (diff) | |
| parent | bf50f76e1d1e45d65b79229c060fe66df8ef289c (diff) | |
| download | PROJ-cfdd474dd8aef197297c488c6133f7484fe421fd.tar.gz PROJ-cfdd474dd8aef197297c488c6133f7484fe421fd.zip | |
Merge pull request #2238 from rouault/update_to_epsg_9_8_11
Update to EPSG 9.8.11, ESRI 10.8.1 and import scope and remarks for conversion
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/test_c_api.cpp | 55 | ||||
| -rw-r--r-- | test/unit/test_factory.cpp | 2 |
2 files changed, 45 insertions, 12 deletions
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. |
