Bug report #17563

$area function is not always working properly when OTF is activated

Added by Jose Manuel almost 7 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
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

Description

Hi,

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.

Thanks

2017150657.dbf (120 Bytes) Jose Manuel, 2017-11-28 11:24 AM

2017150657.prj (389 Bytes) Jose Manuel, 2017-11-28 11:24 AM

2017150657.shp (2.36 KB) Jose Manuel, 2017-11-28 11:24 AM

2017150657.qpj (658 Bytes) Jose Manuel, 2017-11-28 11:24 AM

2017150657.shx (108 Bytes) Jose Manuel, 2017-11-28 11:24 AM

History

#1 Updated by Giovanni Manghi almost 7 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 almost 7 years ago

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.

Thanks

#3 Updated by Nyall Dawson almost 7 years ago

  • Assignee set to Nyall Dawson

#4 Updated by Jürgen Fischer about 6 years ago

  • Status changed from Feedback to Open

#5 Updated by Nyall Dawson about 6 years ago

  • Assignee deleted (Nyall Dawson)

#6 Updated by Giovanni Manghi about 6 years ago

  • Status changed from Open to Feedback

Please try again with 3.4.1

#7 Updated by Jürgen Fischer almost 6 years ago

Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.

#8 Updated by salvatore fiandaca almost 6 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.

#9 Updated by salvatore fiandaca over 5 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF