Bug report #5329

wrong ellipsoid semi-minor axis calculation inside QgsDistanceArea

Added by Giovanni Allegri over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:High
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:15030

Description

In Qgis the semi-minor axis of the ellipsoid is calculated [1] with:

b = a - (f/a)

where
b = semi-minor axis
a = semi-majot axis
f = inverse flattening

while it should be:

b = a - (a/f)

In Qgis the WGS84 semi-minor axis is 6378136,xxx
while it should be 6356752.xxx

This causes wrong distance calculations on ellipsoid as reported here:
http://lists.osgeo.org/pipermail/qgis-user/2012-April/016535.html

I've done a pull request into master repo: https://github.com/qgis/Quantum-GIS/pull/115

giovanni

[1]
http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsdistancearea.cpp#L153

qgisdistancearea.diff Magnifier - patch (720 Bytes) Giovanni Allegri, 2012-04-06 03:20 AM

History

#1 Updated by Nathan Woodrow over 9 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in 55d92681d7eef2

Thanks

Also available in: Atom PDF