Bug report #16820
Wrong area calculations in 2.18.10 - they are correct in 2.18.1
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Field calculator | ||
Affected QGIS version: | 2.18.10 | Regression?: | Yes |
Operating System: | Win 7, 64 bit | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 24719 |
Description
Calculating polygon areas in version 2.18.10 in the field calculator using $area may lead to areas that are far wrong (factor 100) compared to calculation using Area($geometry). Version 2.18.1 does not have this error - See attached screenshot of attribute table where the area calculations are:
Area: $area in version 2.18.10
Area_planM: area($geometry) in version 2.18.10
Area_21801: $area in version 2.18.1
Ar_21801_PL: ea($geometry) in version 2.18.1
Associated revisions
Fix incorrect area calculation in corner cases (fix #16820)
In certain circumstances very proximal nodes could cause instability
in the ellipsoidal area calculation.
Port (slightly tweaked) fix from grass changeset 71167 for same issue,
and add a unit test
Merge pull request #4828 from nyalldawson/fix_16820
Fix incorrect area calculation in corner cases (fix #16820)
Fix incorrect area calculation in corner cases (fix #16820)
In certain circumstances very proximal nodes could cause instability
in the ellipsoidal area calculation.
Port (slightly tweaked) fix from grass changeset 71167 for same issue,
and add a unit test
(cherry-picked from d850393)
Merge pull request #4829 from nyalldawson/fix_16820_218
Fix incorrect area calculation in corner cases (fix #16820)
History
#1 Updated by Giovanni Manghi over 7 years ago
- Status changed from Open to Feedback
Can you say if the area values were right in any 2.18 release after 2.18.1 and before 2.18.10? thanks.
#2 Updated by Giovanni Manghi over 7 years ago
- File Screenshot_20170709_151130.png added
Just made a test on 2.18.10 in Linux and results are identical with the two formulas and identical to the ones you show for 2.18.1
#3 Updated by Giovanni Manghi over 7 years ago
- File Screenshot_20170709_151638.png added
Did the same on Win7, same results.
#4 Updated by Nyall Dawson over 7 years ago
- % Done changed from 0 to 100
- Status changed from Feedback to Closed
Applied in changeset qgis|d85039363a552b901da81467f45925f183bd50a6.