fpExif TGPSPositionTag.GetAsFloat doesn't take hemisphere into account
Original Reporter info from Mantis: regs
Description:
fpExif GetAsFloat does just this.
[code]function TGPSPositionTag.GetAsFloat: Double;
var
arr: TExifDoubleArray;
begin
arr := GetAsFloatArray;
Result := arr[0] + arr[1]/60 + arr[2]/3600;
end;[/code]
Original dExif was doing this. Not just taking Hemisphere into account, but also return NaN, instead of raising exception, if there is no data, making it easier to read gps location in a single line
[code]
function TImageInfo.GetGPSCoordinate(ATagName: String; ACoordType: TGPSCoordType): Extended;
var
vDeg, vSgn: Variant;
begin
Result := NaN;
vDeg := GetTagValue(ATagName);
if VarIsNull(vDeg) then
exit;
if not VarIsArray(vDeg) then
exit;
Result := vDeg[0] + vDeg[1]/60 + vDeg[2]/3600;
vSgn := GetTagValue(ATagName + 'Ref');
if VarIsNull(vSgn) then
exit;
case ACoordType of
ctLatitude : if VarToStr(vSgn)[1] in ['S', 's'] then Result := -Result;
ctLongitude : if VarToStr(vSgn)[1] in ['W', 'w'] then Result := -Result;
end;
end;[/code]
Mantis conversion info: