From 67758b2c67ea329116b59818c038797667c4e1d1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 26 Nov 2018 15:47:57 +0100 Subject: Redirect epsg:XXXX and IGNF:XXXX CRS expansions to the database, and remove the data/epsg and data/IGNF files --- test/unit/test_factory.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/unit/test_factory.cpp') diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 739bb729..20869d91 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -2729,4 +2729,14 @@ TEST(factory, createObjectsFromName) { factory->createObjectsFromName("i_dont_exist", types, false, 1); } +// --------------------------------------------------------------------------- + +TEST(factory, getMetadata) { + auto ctxt = DatabaseContext::create(); + EXPECT_EQ(ctxt->getMetadata("i_do_not_exist"), nullptr); + const char *IGNF_VERSION = ctxt->getMetadata("IGNF.VERSION"); + ASSERT_TRUE(IGNF_VERSION != nullptr); + EXPECT_EQ(std::string(IGNF_VERSION), "3.0.2"); +} + } // namespace -- cgit v1.2.3 From ba111ac8323ff194039a06db87d1fb17ed8175b3 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 3 Dec 2018 16:44:21 +0100 Subject: Export to ESRI WKT: make it use verbatim WKT definition from the database when possible --- test/unit/test_factory.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/unit/test_factory.cpp') diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 20869d91..7cdb0b40 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -2703,6 +2703,13 @@ TEST(factory, createObjectsFromName) { .size(), 1); + // Deprecated object (but without explicit deprecated) + EXPECT_EQ( + factoryEPSG + ->createObjectsFromName("NAD27(CGQ77) / SCoPQ zone 2", {}, false, 2) + .size(), + 1); + const auto types = std::vector{ AuthorityFactory::ObjectType::PRIME_MERIDIAN, AuthorityFactory::ObjectType::ELLIPSOID, -- cgit v1.2.3