diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-04 14:46:41 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-04 14:46:41 +0100 |
| commit | d06c1c55c1c3fc7209abdbdfbf2e3cf34f18cf98 (patch) | |
| tree | 98fe336a41f1397280ee665d08040339967d711b /test/unit/test_c_api.cpp | |
| parent | addf30e4446fd39891fd5bdcb22413ed41e0913b (diff) | |
| download | PROJ-d06c1c55c1c3fc7209abdbdfbf2e3cf34f18cf98.tar.gz PROJ-d06c1c55c1c3fc7209abdbdfbf2e3cf34f18cf98.zip | |
Improve recognition of WKT1 datum names
Diffstat (limited to 'test/unit/test_c_api.cpp')
| -rw-r--r-- | test/unit/test_c_api.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 7db38601..f0480ebe 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -1604,6 +1604,27 @@ TEST_F(CApi, proj_obj_create_geographic_crs) { EXPECT_TRUE(proj_obj_is_equivalent_to(obj, objRef, PJ_COMP_EQUIVALENT)); } + + // Datum with GDAL_WKT1 spelling: database query in alias_name table + { + auto crs = proj_obj_create_geographic_crs( + m_ctxt, "S-JTSK (Ferro)", + "System_Jednotne_Trigonometricke_Site_Katastralni_Ferro", + "Bessel 1841", 6377397.155, 299.1528128, "Ferro", + -17.66666666666667, "Degree", 0.0174532925199433, cs); + ObjectKeeper keeper(crs); + ASSERT_NE(crs, nullptr); + + auto datum = proj_obj_crs_get_datum(m_ctxt, crs); + ASSERT_NE(datum, nullptr); + ObjectKeeper keeper_datum(datum); + + auto datum_name = proj_obj_get_name(datum); + ASSERT_TRUE(datum_name != nullptr); + EXPECT_EQ(datum_name, + std::string("System of the Unified Trigonometrical Cadastral " + "Network (Ferro)")); + } } // --------------------------------------------------------------------------- |
