diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-02-06 14:26:06 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-02-06 14:26:06 +0100 |
| commit | 457b173cbe8fdb790b011d1828a0fd9f8f6221a4 (patch) | |
| tree | e077da59252a134097e64b54ba66b174725650b4 /test | |
| parent | 149bd81691e309d4ab22bed944ea69fbeaec450f (diff) | |
| download | PROJ-457b173cbe8fdb790b011d1828a0fd9f8f6221a4.tar.gz PROJ-457b173cbe8fdb790b011d1828a0fd9f8f6221a4.zip | |
ISO19111: Handle database area objects with no bounding box
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/test_factory.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 81f745f5..95436c75 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -222,6 +222,16 @@ TEST(factory, AuthorityFactory_createExtent) { // --------------------------------------------------------------------------- +TEST(factory, AuthorityFactory_createExtent_no_bbox) { + auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); + auto extent = factory->createExtent("1361"); // Sudan - south. Deprecated + EXPECT_EQ(*(extent->description()), "Sudan - south"); + const auto &geogElts = extent->geographicElements(); + EXPECT_TRUE(geogElts.empty()); +} + +// --------------------------------------------------------------------------- + TEST(factory, AuthorityFactory_createGeodeticDatum) { auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); EXPECT_THROW(factory->createGeodeticDatum("-1"), @@ -414,6 +424,17 @@ TEST(factory, AuthorityFactory_createGeodeticCRS_geographic2D) { // --------------------------------------------------------------------------- +TEST(factory, AuthorityFactory_createGeodeticCRS_geographic2D_area_no_bbox) { + auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); + auto crs = factory->createGeodeticCRS("4296"); // Sudan - deprecated + auto domain = crs->domains()[0]; + auto extent = domain->domainOfValidity(); + ASSERT_TRUE(extent != nullptr); + EXPECT_TRUE(extent->isEquivalentTo(factory->createExtent("1361").get())); +} + +// --------------------------------------------------------------------------- + TEST(factory, AuthorityFactory_createGeodeticCRS_geographic3D) { auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); auto crs = factory->createGeodeticCRS("4979"); |
