-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Area for large polygons in vector/Geometry Tools/Export/Add Geometry Columns #15033
Comments
Author Name: Giovanni Manghi (@gioman) I don't think that this is related to #14750 because that issue is different: if the column is not wide enough the value is cut at the end (and there are no differences between the values computed by the field calculator and the "add geometry columns" tool), in this case the values are completely different. |
Author Name: Giovanni Manghi (@gioman) After all the two issues are not that unrelated. If you compute areas with the field calculator in a enough wide field, then the values make sense ID Area_FC Now I can't understand why values computed with R are so different. In QGIS it was used the layer CRS to make such counts, and in R?
|
Author Name: Giovanni Manghi (@gioman) Giovanni Manghi wrote:
the same values are computed by postgis. |
Author Name: Giovanni Manghi (@gioman)
so I would try to understand why values computed with R are different and eventually close this as duplicate. |
Author Name: alobo - (alobo -) ok, it seems there are 2 issues here:
Giovanni: which version are you using? ok to close this part as a duplicate, but the user cannot set the width of the field
Agus |
Author Name: Giovanni Manghi (@gioman) alobo - wrote:
I'm using master, but the issue is definitely #14750 |
Author Name: alobo - (alobo -) Update to issue 2: clarified thanks to Roger Bivand, no need to open another "With rgeos 0.2-5 and GEOS runtime version: 3.3.2-CAPI-1.7.2, I have: bn <- readOGR(".", "BorneoLCv2google")
8550196769.93012
173647473841.3217 so the hole warnings were the reason for the difference. SVN revision 327 of 16 March enforced the use of createSPComment() in gArea() - the user was expected to denote holes properly themselves before this change. Update your rgeos and try again. Please update the QGIS #15033 to state that from rgeos 0.2-5, the values are correct. The area slot in the Polygons object is a gross area used to order plotting (because until recently R polygons simply overplotted one another), so it is not guaranteed to be a planar area measure for polygons with holes. Roger |
Author Name: Giovanni Manghi (@gioman) alobo - wrote:
counts made with the field calculator take also just a few moments (2/3 seconds in my machine), instead of minutes of the tool in the "vector" menu. |
Author Name: alobo - (alobo -)
Original Redmine Issue: 5332
Affected QGIS version: 1.7.4
Results for large polygons are wrong when calculated with vector/Geometry Tools/Export/Add Geometry Columns
Example in
http://dl.dropbox.com/u/3180464/BorneoLCv2google.zip
Check, for example, polygons with ID 25967 and 26570: according to the table,
the areas are
25967: 8550196769
26570: 1736474738
while visual inspection indicates that 26570 is obviously much larger.
Both results are different than those calculated by R:
25967: 9294889613
26570: 205414657947
Discrepancies with R are particularly large for polygons with area > 1E+10
qgis 1.7.4 on ubuntu 10.04 32bits
This might be related to issue #14750
Agus
The text was updated successfully, but these errors were encountered: