Opened 14 years ago
Last modified 13 years ago
#3132 reopened bug
Field calculator cannot calculates area of polygon
Reported by: | dr | Owned by: | jef |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
Component: | Vectors | Version: | Trunk |
Keywords: | Cc: | dr, gislab, alexbruy | |
Must Fix for Release: | Yes | Platform: | All |
Platform Version: | Awaiting user input: | no |
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.
Attachments (1)
Change History (14)
by , 14 years ago
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Now area of this polygon is negative value.
comment:3 by , 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.
comment:4 by , 14 years ago
r14410, tried new and existing AREA field - all seems normal (result is correct)
comment:5 by , 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
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
That's what you get when you try to save 2849751229.32861 in a 32bit integer. Use a real field.
comment:7 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I've tried use real field but get the same negative result.
comment:9 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Seems fixed for now (tested with r15264)
comment:10 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Bug still present at r15306.
follow-up: 13 comment:11 by , 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.
comment:13 by , 13 years ago
Replying to 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.
fixed in r14395.