From 90473300e0e1359f707486c915be98f437cafe90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20T=C5=AFma?= Date: Sat, 21 Jul 2018 10:08:26 +0200 Subject: [PATCH] Added missing projection parameter handling --- src/map/geotiff.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/map/geotiff.cpp b/src/map/geotiff.cpp index 39c97b01..1ba7a31a 100644 --- a/src/map/geotiff.cpp +++ b/src/map/geotiff.cpp @@ -31,11 +31,14 @@ #define ProjNatOriginLatGeoKey 3081 #define ProjFalseEastingGeoKey 3082 #define ProjFalseNorthingGeoKey 3083 +#define ProjFalseOriginLongGeoKey 3084 #define ProjFalseOriginLatGeoKey 3085 +#define ProjFalseOriginEastingGeoKey 3086 +#define ProjFalseOriginNorthingGeoKey 3087 #define ProjCenterLongGeoKey 3088 #define ProjCenterLatGeoKey 3089 #define ProjCenterEastingGeoKey 3090 -#define ProjFalseOriginNorthingGeoKey 3091 +#define ProjCenterNorthingGeoKey 3091 #define ProjScaleAtNatOriginGeoKey 3092 #define ProjScaleAtCenterGeoKey 3093 #define ProjAzimuthAngleGeoKey 3094 @@ -252,8 +255,11 @@ bool GeoTIFF::readKeys(TIFFFile &file, Ctx &ctx, QMap &kv) const case ProjScaleAtCenterGeoKey: case ProjAzimuthAngleGeoKey: case ProjRectifiedGridAngleGeoKey: + case ProjFalseOriginLongGeoKey: case ProjFalseOriginLatGeoKey: case ProjCenterEastingGeoKey: + case ProjCenterNorthingGeoKey: + case ProjFalseOriginEastingGeoKey: case ProjFalseOriginNorthingGeoKey: if (!readGeoValue(file, ctx.values, entry.ValueOffset, value.DOUBLE)) @@ -401,6 +407,8 @@ bool GeoTIFF::projectedModel(QMap &kv) lon0 = au.toDegrees(kv.value(ProjNatOriginLongGeoKey).DOUBLE); else if (kv.contains(ProjCenterLongGeoKey)) lon0 = au.toDegrees(kv.value(ProjCenterLongGeoKey).DOUBLE); + else if (kv.contains(ProjFalseOriginLongGeoKey)) + lon0 = au.toDegrees(kv.value(ProjFalseOriginLongGeoKey).DOUBLE); else lon0 = NAN; if (kv.contains(ProjScaleAtNatOriginGeoKey)) @@ -423,6 +431,8 @@ bool GeoTIFF::projectedModel(QMap &kv) sp2 = NAN; if (kv.contains(ProjFalseNorthingGeoKey)) fn = lu.toMeters(kv.value(ProjFalseNorthingGeoKey).DOUBLE); + else if (kv.contains(ProjCenterNorthingGeoKey)) + fn = lu.toMeters(kv.value(ProjCenterNorthingGeoKey).DOUBLE); else if (kv.contains(ProjFalseOriginNorthingGeoKey)) fn = lu.toMeters(kv.value(ProjFalseOriginNorthingGeoKey).DOUBLE); else @@ -431,6 +441,8 @@ bool GeoTIFF::projectedModel(QMap &kv) fe = lu.toMeters(kv.value(ProjFalseEastingGeoKey).DOUBLE); else if (kv.contains(ProjCenterEastingGeoKey)) fe = lu.toMeters(kv.value(ProjCenterEastingGeoKey).DOUBLE); + else if (kv.contains(ProjFalseOriginEastingGeoKey)) + fe = lu.toMeters(kv.value(ProjFalseOriginEastingGeoKey).DOUBLE); else fe = NAN; -- 2.11.4.GIT