diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-09-04 15:46:13 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-09-08 11:11:03 +0200 |
| commit | 024f63731283c0026ad5b4dea4084bc48bbcc6f7 (patch) | |
| tree | 7264a3e7c9f5388a537d0d4dbb31bbeceea720b0 /test/unit/test_operation.cpp | |
| parent | faf7ec2d7f5d489bfd187f1a3408f0f09f94282f (diff) | |
| download | PROJ-024f63731283c0026ad5b4dea4084bc48bbcc6f7.tar.gz PROJ-024f63731283c0026ad5b4dea4084bc48bbcc6f7.zip | |
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.
Diffstat (limited to 'test/unit/test_operation.cpp')
| -rw-r--r-- | test/unit/test_operation.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index 89edfca4..96727c2b 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: Test ISO19111:2018 implementation + * Purpose: Test ISO19111:2019 implementation * Author: Even Rouault <even dot rouault at spatialys dot com> * ****************************************************************************** @@ -446,28 +446,28 @@ TEST(operation, concatenated_operation) { std::string src_wkt; { auto formatter = - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018); + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019); src_wkt = GeographicCRS::EPSG_4326->exportToWKT(formatter.get()); } std::string dst_wkt; { auto formatter = - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018); + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019); dst_wkt = GeographicCRS::EPSG_4979->exportToWKT(formatter.get()); } std::string step1_wkt; { auto formatter = - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018); + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019); step1_wkt = transf_1->exportToWKT(formatter.get()); } std::string step2_wkt; { auto formatter = - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018); + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019); step2_wkt = transf_2->exportToWKT(formatter.get()); } @@ -485,7 +485,7 @@ TEST(operation, concatenated_operation) { EXPECT_EQ(replaceAll(replaceAll(concat->exportToWKT( WKTFormatter::create( - WKTFormatter::Convention::WKT2_2018) + WKTFormatter::Convention::WKT2_2019) .get()), " ", ""), "\n", ""), @@ -6559,7 +6559,7 @@ TEST(operation, compoundCRS_to_compoundCRS_context) { // Test that we can round-trip this through WKT and still get the same // PROJ string. auto wkt = list[0]->exportToWKT( - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018).get()); + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019).get()); auto obj = WKTParser().createFromWKT(wkt); auto co = nn_dynamic_pointer_cast<CoordinateOperation>(obj); ASSERT_TRUE(co != nullptr); @@ -6775,7 +6775,7 @@ TEST(operation, compoundCRS_from_WKT2_to_geogCRS_3D_context) { CoordinateOperationFactory::create()->createOperations(src, dst, ctxt); ASSERT_GE(list.size(), 1U); auto wkt2 = src->exportToWKT( - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018).get()); + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019).get()); auto obj = WKTParser().createFromWKT(wkt2); auto src_from_wkt2 = nn_dynamic_pointer_cast<CRS>(obj); ASSERT_TRUE(src_from_wkt2 != nullptr); @@ -7019,10 +7019,10 @@ TEST(operation, createOperation_on_crs_with_canonical_bound_crs) { EXPECT_TRUE(op->isEquivalentTo(boundCRS->transformation().get())); { auto wkt1 = op->exportToWKT( - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018) + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019) .get()); auto wkt2 = boundCRS->transformation()->exportToWKT( - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018) + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019) .get()); EXPECT_EQ(wkt1, wkt2); } @@ -7035,10 +7035,10 @@ TEST(operation, createOperation_on_crs_with_canonical_bound_crs) { op->isEquivalentTo(boundCRS->transformation()->inverse().get())); { auto wkt1 = op->exportToWKT( - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018) + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019) .get()); auto wkt2 = boundCRS->transformation()->inverse()->exportToWKT( - WKTFormatter::create(WKTFormatter::Convention::WKT2_2018) + WKTFormatter::create(WKTFormatter::Convention::WKT2_2019) .get()); EXPECT_EQ(wkt1, wkt2); } |
