Bug report #17563
$area function is not always working properly when OTF is activated
|Affected QGIS version:||2.18.14||Regression?:||No|
|Operating System:||WIN 7 64bit||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25460|
I have detected a possible bug in Qgis and I would like to report it.
I use EPSG:25829 with OTF activated.
The $area function is not always working properly when OTF is activated, as it should. Sometimes there is a minimal error when calculating surfaces that shows up in big polygons.
The error seems to dissapear when temporarily dissabling OTF in Project properties.
I have seen this error in 2.14 and in 2.18.
#1 Updated by Giovanni Manghi over 3 years ago
- Priority changed from High to Normal
- Category changed from Geometry to Vectors
- Status changed from Open to Feedback
So, to clarify: you get different area values for the same polygon when computed several times within the same project or in different projects?
If is the latter you must check if the two projects are using the same reference ellipsoid, check in the project properties.
#2 Updated by Jose Manuel over 3 years ago
- File 2017150657.shx added
- File 2017150657.shp added
- File 2017150657.qpj added
- File 2017150657.prj added
- File 2017150657.dbf added
I get different area values for the same polygon within the same project.
I send you a shape with the two values:
- "ha" was the value got with OTF activated.
- "Vexiza" was the value got without OTF activated.
#8 Updated by salvatore fiandaca over 2 years ago
I do not think it's a bug, from the definition of the $ area function we read:
[Returns the area of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings.]
so it is normal that the values calculated with OTF on or off are different.