From bd30de84a92d9c7d06cb61f7d943edacf2e65fd6 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 28 Dec 2018 12:34:58 +0100 Subject: WKT parser: fix parsing of BoundCRS of VerticalCRS to Geographic3D CRS --- src/iso19111/io.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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(targetCRS.get())) { sourceTransformationCRS = sourceCRS->extractGeographicCRS(); if (!sourceTransformationCRS) { - throw ParsingException("Cannot find GeographicCRS in sourceCRS"); + sourceTransformationCRS = + std::dynamic_pointer_cast(sourceCRS); + if (!sourceTransformationCRS) { + throw ParsingException( + "Cannot find GeographicCRS or VerticalCRS in sourceCRS"); + } } } else { sourceTransformationCRS = sourceCRS; -- cgit v1.2.3