diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-28 12:34:58 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-28 12:34:58 +0100 |
| commit | bd30de84a92d9c7d06cb61f7d943edacf2e65fd6 (patch) | |
| tree | 582f583c0e37eebd43634ef195f43be46c28c63f /src | |
| parent | c8cce384a175edc666de388e3e9307a8cd5c9501 (diff) | |
| download | PROJ-bd30de84a92d9c7d06cb61f7d943edacf2e65fd6.tar.gz PROJ-bd30de84a92d9c7d06cb61f7d943edacf2e65fd6.zip | |
WKT parser: fix parsing of BoundCRS of VerticalCRS to Geographic3D CRS
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/io.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 7f68a579..6175c415 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -3773,7 +3773,12 @@ BoundCRSNNPtr WKTParser::Private::buildBoundCRS(const WKTNodeNNPtr &node) { if (dynamic_cast<GeographicCRS *>(targetCRS.get())) { sourceTransformationCRS = sourceCRS->extractGeographicCRS(); if (!sourceTransformationCRS) { - throw ParsingException("Cannot find GeographicCRS in sourceCRS"); + sourceTransformationCRS = + std::dynamic_pointer_cast<VerticalCRS>(sourceCRS); + if (!sourceTransformationCRS) { + throw ParsingException( + "Cannot find GeographicCRS or VerticalCRS in sourceCRS"); + } } } else { sourceTransformationCRS = sourceCRS; |
