diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-10 19:04:32 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-01-10 19:04:32 +0100 |
| commit | 30205fef7c4a73342a384eca40893a52ea9d6794 (patch) | |
| tree | 8eb49152bcc44e3fd9904b4d17ba57dc9bba69d5 /test/unit | |
| parent | 39ffdcadbd16fdfbf961973be94ae8479441e411 (diff) | |
| download | PROJ-30205fef7c4a73342a384eca40893a52ea9d6794.tar.gz PROJ-30205fef7c4a73342a384eca40893a52ea9d6794.zip | |
CompoundCRS::identify(): avoid exception when horiz/vertical part is a BoundCRS
The exception only affects C++ users. It was caught by the C layer.
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/test_crs.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp index 88a7813a..82eb4562 100644 --- a/test/unit/test_crs.cpp +++ b/test/unit/test_crs.cpp @@ -3493,6 +3493,17 @@ TEST(crs, compoundCRS_identify_db) { EXPECT_EQ(res.front().first->getEPSGCode(), 8769); EXPECT_EQ(res.front().second, 70); } + { + auto obj = PROJStringParser().createFromPROJString( + "+proj=tmerc +lat_0=0 +lon_0=72.05 +k=1 +x_0=3500000 " + "+y_0=-5811057.63 +ellps=krass " + "+towgs84=23.57,-140.95,-79.8,0,-0.35,-0.79,-0.22 " + "+geoidgrids=egm08_25.gtx +units=m +no_defs +type=crs"); + auto crs = nn_dynamic_pointer_cast<CompoundCRS>(obj); + ASSERT_TRUE(crs != nullptr); + // Just check we don't get an exception + crs->identify(factory); + } } // --------------------------------------------------------------------------- |
