From 024f63731283c0026ad5b4dea4084bc48bbcc6f7 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 4 Sep 2019 15:46:13 +0200 Subject: Use in API and utilities WKT2_2019 instead of WKT2_2018 (fixes #1518) - C API: PJ_GUESSED_WKT2_2019 is added, PJ_GUESSED_WKT2_2018 aliased to it - C API: PJ_WKT2_2019[_SIMPLIFIED] is added, PJ_WKT2_2018[_SIMPLIFIED] alias to it - C++ API: similarly for WKTFormatter::Convention::WKT2_2019[_SIMPLIFIED] Those above changes should be fully backward API and ABI compatible. projinfo changes: - accept WKT2_2019 as value for -o switch. WKT2_2018 is still accepted (undocumented) - output now uses 'WKT2_2019 string:', so might break scripts that would rely on that. Other internal code references to WKT2_2018 changes to WKT2_2019, included in tests. --- test/unit/test_c_api.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/unit/test_c_api.cpp') diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 2a1c8577..ace66a0c 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: Test ISO19111:2018 implementation + * Purpose: Test ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -333,13 +333,13 @@ TEST_F(CApi, proj_as_wkt) { ASSERT_NE(obj, nullptr); { - auto wkt = proj_as_wkt(m_ctxt, obj, PJ_WKT2_2018, nullptr); + auto wkt = proj_as_wkt(m_ctxt, obj, PJ_WKT2_2019, nullptr); ASSERT_NE(wkt, nullptr); EXPECT_TRUE(std::string(wkt).find("GEOGCRS[") == 0) << wkt; } { - auto wkt = proj_as_wkt(m_ctxt, obj, PJ_WKT2_2018_SIMPLIFIED, nullptr); + auto wkt = proj_as_wkt(m_ctxt, obj, PJ_WKT2_2019_SIMPLIFIED, nullptr); ASSERT_NE(wkt, nullptr); EXPECT_TRUE(std::string(wkt).find("GEOGCRS[") == 0) << wkt; EXPECT_TRUE(std::string(wkt).find("ANGULARUNIT[") == std::string::npos) @@ -435,7 +435,7 @@ TEST_F(CApi, proj_as_wkt) { // unsupported option { const char *const options[] = {"unsupported=yes", nullptr}; - auto wkt = proj_as_wkt(m_ctxt, obj, PJ_WKT2_2018, options); + auto wkt = proj_as_wkt(m_ctxt, obj, PJ_WKT2_2019, options); EXPECT_EQ(wkt, nullptr); } } @@ -1631,7 +1631,7 @@ TEST_F(CApi, proj_context_guess_wkt_dialect) { " AXIS[\"geodetic latitude (Lat)\",north],\n" " AXIS[\"geodetic longitude (Lon)\",east],\n" " UNIT[\"degree\",0.0174532925199433]]"), - PJ_GUESSED_WKT2_2018); + PJ_GUESSED_WKT2_2019); EXPECT_EQ(proj_context_guess_wkt_dialect( nullptr, @@ -2690,7 +2690,7 @@ TEST_F(CApi, proj_crs_alter_parameters_linear_unit) { ObjectKeeper keeper_alteredCRS(alteredCRS); ASSERT_NE(alteredCRS, nullptr); - auto wkt = proj_as_wkt(m_ctxt, alteredCRS, PJ_WKT2_2018, nullptr); + auto wkt = proj_as_wkt(m_ctxt, alteredCRS, PJ_WKT2_2019, nullptr); ASSERT_NE(wkt, nullptr); EXPECT_TRUE(std::string(wkt).find("500000") != std::string::npos) << wkt; @@ -2704,7 +2704,7 @@ TEST_F(CApi, proj_crs_alter_parameters_linear_unit) { ObjectKeeper keeper_alteredCRS(alteredCRS); ASSERT_NE(alteredCRS, nullptr); - auto wkt = proj_as_wkt(m_ctxt, alteredCRS, PJ_WKT2_2018, nullptr); + auto wkt = proj_as_wkt(m_ctxt, alteredCRS, PJ_WKT2_2019, nullptr); ASSERT_NE(wkt, nullptr); EXPECT_TRUE(std::string(wkt).find("250000") != std::string::npos) << wkt; -- cgit v1.2.3