Bug report #19775

Error on calculation $area

Added by Franck-Yves DABIN over 5 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Field calculator
Affected QGIS version:3.2.2 Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:27600

Description

Hi,
I work on QGIS 3.2.2.
I have a project in EPSG:32630 with a POSTGIS layer in EPSG:32630. No problem with the $area calculation.
When I define my project in EPSG: 32629, the $area function give me a different result (1755 Ha) than :
  • Export/Add Geomtry columns in the vector menu of QGIS (1732 Ha)
  • FME (Safe Software) (1732 Ha)
  • ArcGIS (1732 Ha)
    An example of data is associated to this post.
    Thanks for your reply,

example.zip (2.82 KB) Franck-Yves DABIN, 2018-09-05 04:35 PM

example_3.zip (2.63 KB) Franck-Yves DABIN, 2018-09-05 04:59 PM

History

#1 Updated by Franck-Yves DABIN over 5 years ago

Here an example more detailed :
  • Column "superf_30" calculated with $area / Layer EPSG:32630 / Project EPSG:32630 (in Ha)
  • Column "superf_29" calculated with $area / Layer EPSG:32630 / Project EPSG:32629 (in Ha)
  • Column "superf_no" calculated with $area / Layer EPSG:32630 / Project No projection (in Ha)
  • Column "superf_29b" calculated with $area / Layer EPSG:32629 / Project EPSG:32629 (in Ha)
  • Column "area" calculated with Export/Add Geometry columns in the vector menu of QGIS / Layer EPSG:32629 / Project EPSG:32629 (in square meters)
    This last area is the same than in FME and ArcGIS and seems to be true.

#2 Updated by Harrissou Santanna over 5 years ago

  • Status changed from Open to Feedback

Sorry I did not view the attached data but are you aware that, as stated in their help panel, the $area returns the ellipsoidal (if set, otherwise planimetric) area based on the project CRS while area($geometry) returns the planimetric area in the layer CRS?

#3 Updated by Franck-Yves DABIN over 5 years ago

Thanks for your reply, Sorry for this false ticket.
If I understand the $area (based on ellipsoid) have a better precision than the area($geometry) (based on plan) ?
However, there remains an anomaly : We use custom dialogs for editing the POSTGIS layer and the area is calculated automatically by the function "$area" but the result is the same than "area($geometry)".
If I do a "$area" manually on the attribute table, the result is different from the "$area" of the custom dialogs.

#4 Updated by Giovanni Manghi over 5 years ago

However, there remains an anomaly : We use custom dialogs for editing the POSTGIS layer and the area is calculated automatically by the function "$area" but the result is the same than "area($geometry)".
If I do a "$area" manually on the attribute table, the result is different from the "$area" of the custom dialogs.

can you update the subject and description of this ticket then? thanks!

#5 Updated by Jürgen Fischer about 5 years ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.

Also available in: Atom PDF