diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-06 23:34:09 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-01-07 12:17:13 +0100 |
| commit | 699b92250a90e5c333572245cf3d09c9e00e50e5 (patch) | |
| tree | 613a0e59b73861a16fc21c7a41b70245e297452c /test | |
| parent | 529eb50f5d7e817dd27674984050a9bf1a6dce55 (diff) | |
| download | PROJ-699b92250a90e5c333572245cf3d09c9e00e50e5.tar.gz PROJ-699b92250a90e5c333572245cf3d09c9e00e50e5.zip | |
createObjectsFromName(): make it look up in the alias_name table too (fixes #1823)
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/test_c_api.cpp | 2 | ||||
| -rw-r--r-- | test/unit/test_factory.cpp | 4 | ||||
| -rw-r--r-- | test/unit/test_io.cpp | 12 |
3 files changed, 7 insertions, 11 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 78e6bced..a657c61e 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -1668,7 +1668,7 @@ TEST_F(CApi, proj_create_from_name) { false, 0, nullptr); ASSERT_NE(res, nullptr); ObjListKeeper keeper_res(res); - EXPECT_EQ(proj_list_get_count(res), 4); + EXPECT_EQ(proj_list_get_count(res), 5); } { auto res = proj_create_from_name(m_ctxt, "xx", "WGS 84", nullptr, 0, diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 0d47bfc3..c6865f04 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -2733,8 +2733,8 @@ TEST(factory, createObjectsFromName) { EXPECT_EQ(factory->createObjectsFromName("").size(), 0U); - // ellipsoid + 3 geodeticCRS - EXPECT_EQ(factory->createObjectsFromName("WGS 84", {}, false).size(), 4U); + // ellipsoid + datum + 3 geodeticCRS + EXPECT_EQ(factory->createObjectsFromName("WGS 84", {}, false).size(), 5U); EXPECT_EQ(factory->createObjectsFromName("WGS 84", {}, true, 10).size(), 10U); diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index d165157d..fd38847c 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -493,18 +493,14 @@ TEST(wkt_parse, wkt1_geographic_old_datum_name_from_EPSG_code) { // --------------------------------------------------------------------------- -TEST(wkt_parse, wkt1_geographic_old_datum_name_witout_EPSG_code) { +TEST(wkt_parse, wkt1_geographic_old_datum_name_without_EPSG_code) { auto wkt = "GEOGCS[\"S-JTSK (Ferro)\",\n" " " "DATUM[\"System_Jednotne_Trigonometricke_Site_Katastralni_Ferro\",\n" - " SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,\n" - " AUTHORITY[\"EPSG\",\"7004\"]]],\n" - " PRIMEM[\"Ferro\",-17.66666666666667,\n" - " AUTHORITY[\"EPSG\",\"8909\"]],\n" - " UNIT[\"degree\",0.0174532925199433,\n" - " AUTHORITY[\"EPSG\",\"9122\"]],\n" - " AUTHORITY[\"EPSG\",\"4818\"]]"; + " SPHEROID[\"Bessel 1841\",6377397.155,299.1528128]],\n" + " PRIMEM[\"Ferro\",-17.66666666666667],\n" + " UNIT[\"degree\",0.0174532925199433]]"; auto obj = WKTParser() .attachDatabaseContext(DatabaseContext::create()) .createFromWKT(wkt); |
