mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Added missing projection parameter handling
This commit is contained in:
parent
5706cdcfa1
commit
90473300e0
@ -31,11 +31,14 @@
|
|||||||
#define ProjNatOriginLatGeoKey 3081
|
#define ProjNatOriginLatGeoKey 3081
|
||||||
#define ProjFalseEastingGeoKey 3082
|
#define ProjFalseEastingGeoKey 3082
|
||||||
#define ProjFalseNorthingGeoKey 3083
|
#define ProjFalseNorthingGeoKey 3083
|
||||||
|
#define ProjFalseOriginLongGeoKey 3084
|
||||||
#define ProjFalseOriginLatGeoKey 3085
|
#define ProjFalseOriginLatGeoKey 3085
|
||||||
|
#define ProjFalseOriginEastingGeoKey 3086
|
||||||
|
#define ProjFalseOriginNorthingGeoKey 3087
|
||||||
#define ProjCenterLongGeoKey 3088
|
#define ProjCenterLongGeoKey 3088
|
||||||
#define ProjCenterLatGeoKey 3089
|
#define ProjCenterLatGeoKey 3089
|
||||||
#define ProjCenterEastingGeoKey 3090
|
#define ProjCenterEastingGeoKey 3090
|
||||||
#define ProjFalseOriginNorthingGeoKey 3091
|
#define ProjCenterNorthingGeoKey 3091
|
||||||
#define ProjScaleAtNatOriginGeoKey 3092
|
#define ProjScaleAtNatOriginGeoKey 3092
|
||||||
#define ProjScaleAtCenterGeoKey 3093
|
#define ProjScaleAtCenterGeoKey 3093
|
||||||
#define ProjAzimuthAngleGeoKey 3094
|
#define ProjAzimuthAngleGeoKey 3094
|
||||||
@ -252,8 +255,11 @@ bool GeoTIFF::readKeys(TIFFFile &file, Ctx &ctx, QMap<quint16, Value> &kv) const
|
|||||||
case ProjScaleAtCenterGeoKey:
|
case ProjScaleAtCenterGeoKey:
|
||||||
case ProjAzimuthAngleGeoKey:
|
case ProjAzimuthAngleGeoKey:
|
||||||
case ProjRectifiedGridAngleGeoKey:
|
case ProjRectifiedGridAngleGeoKey:
|
||||||
|
case ProjFalseOriginLongGeoKey:
|
||||||
case ProjFalseOriginLatGeoKey:
|
case ProjFalseOriginLatGeoKey:
|
||||||
case ProjCenterEastingGeoKey:
|
case ProjCenterEastingGeoKey:
|
||||||
|
case ProjCenterNorthingGeoKey:
|
||||||
|
case ProjFalseOriginEastingGeoKey:
|
||||||
case ProjFalseOriginNorthingGeoKey:
|
case ProjFalseOriginNorthingGeoKey:
|
||||||
if (!readGeoValue(file, ctx.values, entry.ValueOffset,
|
if (!readGeoValue(file, ctx.values, entry.ValueOffset,
|
||||||
value.DOUBLE))
|
value.DOUBLE))
|
||||||
@ -401,6 +407,8 @@ bool GeoTIFF::projectedModel(QMap<quint16, Value> &kv)
|
|||||||
lon0 = au.toDegrees(kv.value(ProjNatOriginLongGeoKey).DOUBLE);
|
lon0 = au.toDegrees(kv.value(ProjNatOriginLongGeoKey).DOUBLE);
|
||||||
else if (kv.contains(ProjCenterLongGeoKey))
|
else if (kv.contains(ProjCenterLongGeoKey))
|
||||||
lon0 = au.toDegrees(kv.value(ProjCenterLongGeoKey).DOUBLE);
|
lon0 = au.toDegrees(kv.value(ProjCenterLongGeoKey).DOUBLE);
|
||||||
|
else if (kv.contains(ProjFalseOriginLongGeoKey))
|
||||||
|
lon0 = au.toDegrees(kv.value(ProjFalseOriginLongGeoKey).DOUBLE);
|
||||||
else
|
else
|
||||||
lon0 = NAN;
|
lon0 = NAN;
|
||||||
if (kv.contains(ProjScaleAtNatOriginGeoKey))
|
if (kv.contains(ProjScaleAtNatOriginGeoKey))
|
||||||
@ -423,6 +431,8 @@ bool GeoTIFF::projectedModel(QMap<quint16, Value> &kv)
|
|||||||
sp2 = NAN;
|
sp2 = NAN;
|
||||||
if (kv.contains(ProjFalseNorthingGeoKey))
|
if (kv.contains(ProjFalseNorthingGeoKey))
|
||||||
fn = lu.toMeters(kv.value(ProjFalseNorthingGeoKey).DOUBLE);
|
fn = lu.toMeters(kv.value(ProjFalseNorthingGeoKey).DOUBLE);
|
||||||
|
else if (kv.contains(ProjCenterNorthingGeoKey))
|
||||||
|
fn = lu.toMeters(kv.value(ProjCenterNorthingGeoKey).DOUBLE);
|
||||||
else if (kv.contains(ProjFalseOriginNorthingGeoKey))
|
else if (kv.contains(ProjFalseOriginNorthingGeoKey))
|
||||||
fn = lu.toMeters(kv.value(ProjFalseOriginNorthingGeoKey).DOUBLE);
|
fn = lu.toMeters(kv.value(ProjFalseOriginNorthingGeoKey).DOUBLE);
|
||||||
else
|
else
|
||||||
@ -431,6 +441,8 @@ bool GeoTIFF::projectedModel(QMap<quint16, Value> &kv)
|
|||||||
fe = lu.toMeters(kv.value(ProjFalseEastingGeoKey).DOUBLE);
|
fe = lu.toMeters(kv.value(ProjFalseEastingGeoKey).DOUBLE);
|
||||||
else if (kv.contains(ProjCenterEastingGeoKey))
|
else if (kv.contains(ProjCenterEastingGeoKey))
|
||||||
fe = lu.toMeters(kv.value(ProjCenterEastingGeoKey).DOUBLE);
|
fe = lu.toMeters(kv.value(ProjCenterEastingGeoKey).DOUBLE);
|
||||||
|
else if (kv.contains(ProjFalseOriginEastingGeoKey))
|
||||||
|
fe = lu.toMeters(kv.value(ProjFalseOriginEastingGeoKey).DOUBLE);
|
||||||
else
|
else
|
||||||
fe = NAN;
|
fe = NAN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user