From d49ce528bbdc3e71e971db2ca5f0acd4ee649208 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 26 Feb 2020 09:37:13 +1000 Subject: Add capability to force a fixed value for a non-specified CRS component while mapping ESRI projections, and map the Behrman projection to cae with lat_ts=30, lon_0=0 --- src/iso19111/io.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/iso19111') diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 5b122707..861aadbf 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -3185,7 +3185,8 @@ ConversionNNPtr WKTParser::Private::buildProjectionFromESRI( if (iter != mapParamNameToValue.end()) { if (param->wkt2_name == nullptr) { try { - if (param->fixed_value == io::asDouble(iter->second)) { + if (io::asDouble(param->fixed_value) == + io::asDouble(iter->second)) { matchCount++; } } catch (const std::exception &) { @@ -3193,6 +3194,8 @@ ConversionNNPtr WKTParser::Private::buildProjectionFromESRI( } else { matchCount++; } + } else if (param->is_fixed_value) { + mapParamNameToValue[param->esri_name] = param->fixed_value; } } if (matchCount > bestMatchCount) { -- cgit v1.2.3