Bug report #3132
Field calculator cannot calculates area of polygon
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Jürgen Fischer | ||
Category: | Vectors | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | worksforme |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 13192 |
Description
I have vector layer, which contains one polygon. When I try to calculate their area with field calculator I get NULL result, but ftools Export/Add geometry columns tool works fine. My layer in attachment.
Related issues
Associated revisions
fix #3132
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14395 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #3132
git-svn-id: http://svn.osgeo.org/qgis/trunk@14395 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Jürgen Fischer about 14 years ago
- Status changed from Open to Closed
- Resolution set to fixed
fixed in 650abbb9 (SVN r14396).
#2 Updated by dr - about 14 years ago
- Status changed from Closed to Feedback
- Resolution deleted (
fixed)
Now area of this polygon is negative value.
#3 Updated by Jürgen Fischer about 14 years ago
um, I get 2849751229.32861 - just like in the identify results. And the earlier problem wasn't that the area wasn't calculated, but only that the attribute table didn't show the updated result.
#4 Updated by Maxim Dubinin about 14 years ago
0c31b555 (SVN r14411), tried new and existing AREA field - all seems normal (result is correct)
#5 Updated by Maxim Dubinin about 14 years ago
I'm afraid I have to take it back, I do have negatives too, please check this video:
http://screencast.com/t/58exsAG3vz
#6 Updated by Jürgen Fischer about 14 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
That's what you get when you try to save 2849751229.32861 in a 32bit integer. Use a real field.
#7 Updated by dr - about 14 years ago
- Resolution deleted (
fixed) - Status changed from Closed to Feedback
I've tried use real field but get the same negative result.
#8 Updated by Paolo Cavallini over 13 years ago
Is this still true?
#9 Updated by Alexander Bruy over 13 years ago
- Status changed from Feedback to Closed
- Resolution set to fixed
Seems fixed for now (tested with )
#10 Updated by dr - over 13 years ago
- Status changed from Closed to Feedback
- Resolution deleted (
fixed)
Bug still present at 95af577b (SVN r15307).
#11 Updated by Borys Jurgiel over 13 years ago
I can confirm. Creating integer as well as floating point fails. Right after calculating you can see proper values (as they're not updated from layer), but after layer save they becomes negative.
However, updating the existing AREA field works fine.
#12 Updated by Borys Jurgiel over 13 years ago
(tested on Ubuntu)
#13 Updated by Enrico Fiore over 13 years ago
Replying to [comment:11 borysiasty]:
I can confirm. Creating integer as well as floating point fails.
For floating values the problem happen if you assign precision = 0, otherwise area is correct.
#14 Updated by Giovanni Manghi almost 13 years ago
- Target version changed from Version 1.7.0 to Version 1.7.4
#15 Updated by Giovanni Manghi almost 13 years ago
- Affected QGIS version set to master
- Status changed from Feedback to Closed
- Resolution set to worksforme
- Pull Request or Patch supplied set to No
- Crashes QGIS or corrupts data set to No
Seems to work fine now. Reopen if necessary.