From 699de8b1334f8d8683bd99e9a53495160f0234ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 9 Jan 2018 00:26:18 +0100 Subject: [PATCH] Added support for files referenced using geodetic datum+projection combination --- src/map/geotiff.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/map/geotiff.cpp b/src/map/geotiff.cpp index 8c2acd09..a8ba874c 100644 --- a/src/map/geotiff.cpp +++ b/src/map/geotiff.cpp @@ -321,6 +321,15 @@ bool GeoTIFF::projectedModel(QMap &kv) _errorString = QString("%1+%2: unknown GCS+projection combination") .arg(kv.value(GeographicTypeGeoKey).SHORT) .arg(kv.value(ProjectionGeoKey).SHORT); + } else if (IS_SET(kv, GeogGeodeticDatumGeoKey) + && IS_SET(kv, ProjectionGeoKey)) { + pcs = PCS(kv.value(GeogGeodeticDatumGeoKey).SHORT - 2000, + kv.value(ProjectionGeoKey).SHORT); + if (pcs.isNull()) + _errorString = + QString("%1+%2: unknown geodetic datum+projection combination") + .arg(kv.value(GeogGeodeticDatumGeoKey).SHORT) + .arg(kv.value(ProjectionGeoKey).SHORT); } else { Datum d = datum(kv); if (d.isNull())