aboutsummaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-10-08 18:41:57 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-11-01 12:57:34 +0100
commitc2b0dcc468b4e722e46fe10fca93fe70a95fcb8e (patch)
tree5f0b2d0981734f72b2b77d1a1db748041a89d98e /test/unit
parent82695cce869e1bcf2eb2a8ff078b679b6a21c663 (diff)
downloadPROJ-c2b0dcc468b4e722e46fe10fca93fe70a95fcb8e.tar.gz
PROJ-c2b0dcc468b4e722e46fe10fca93fe70a95fcb8e.zip
When reading from database, possibly return VerticalCRS with a DatumEnsemble
Only occurence for now is EPSG:9451 'BI height' using the 'British Isles height ensemble'
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/test_factory.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index c869fa50..681ac810 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -619,6 +619,20 @@ TEST(factory, AuthorityFactory_createVerticalCRS) {
// ---------------------------------------------------------------------------
+TEST(factory, AuthorityFactory_createVerticalCRS_with_datum_ensemble) {
+ auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG");
+ EXPECT_THROW(factory->createVerticalCRS("-1"),
+ NoSuchAuthorityCodeException);
+
+ auto crs = factory->createVerticalCRS("9451"); // BI height
+ ASSERT_TRUE(crs->datum() == nullptr);
+ ASSERT_TRUE(crs->datumEnsemble() != nullptr);
+ EXPECT_TRUE(crs->datumEnsemble()->isEquivalentTo(
+ factory->createDatumEnsemble("1288").get()));
+}
+
+// ---------------------------------------------------------------------------
+
TEST(factory, AuthorityFactory_createConversion) {
auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG");
EXPECT_THROW(factory->createConversion("-1"), NoSuchAuthorityCodeException);