Opened 7 years ago

Closed 7 years ago

#5858 closed defect (fixed)

inverse flattening in netcdfdataset.cpp

Reported by: stockli Owned by: warmerdam
Priority: normal Milestone: 1.11.3
Component: default Version: 1.11.2
Severity: normal Keywords: inverse flattening


In netcdfdataset.cpp, line 1993/1994, I believe that the inverse flattening calculation is wrong:

dfInverseFlattening =

1.0 / ( dfSemiMajorAxis - dfSemiMinorAxis ) / dfSemiMajorAxis;

should be:

dfInverseFlattening =

1.0 / (( dfSemiMajorAxis - dfSemiMinorAxis ) / dfSemiMajorAxis);

The first formula yields values below 1.0, the second (corrected) formula yields values around 300 for WGS 84.

Change History (1)

comment:1 Changed 7 years ago by Even Rouault

Milestone: 1.11.3
Resolution: fixed
Status: newclosed

trunk r28565 "Add OSRCalcInvFlattening() and OSRCalcSemiMinorFromInvFlattening(), and use them in various places (#5858)"

trunk r28566 "netCDF: fix computation of inverse flattening (#5858)"

branches/1.11 r28567 "netCDF: fix computation of inverse flattening (#5858)"

Note: See TracTickets for help on using tickets.