Project

General

Profile

Bug #3480

Area calculation of polygons - trial

Added by Giulio Di Anastasio over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
09/01/2017
Due date:
% Done:

100%

Close

Description

Dear Philippe,
I attach herewith a shapefile with three geometries:
1. square, 10 x 10 meters
2. rectangle, 30 x 10 meters
3. circle, 10 meters radius

I created these features in CAD through rectangle and circle tool. Interestingly, it is imported not as polygons but as polylines. I tried to calculate the area via GIS, I could not...

One more thing: in the field calculator, there are two ways to calculate areas:

1. $area = Returns the area of the current feature. The area calculated by this function respects both the current project's ellipsoid setting and area unit settings. Eg, if an ellipsoid has been set for the project then the calculated area will be ellipsoidal, and if no ellipsoid is set then the calculated area will be planimetric.
Syntax
$area

Examples
$area → 42

2. area = 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.
Syntax
area(geometry)
Arguments

geometry
polygon geometry object

Examples
area(geom_from_wkt('POLYGON)')) → 8.0

Giulio

geometry try Giulio.zip (2.29 KB) Giulio Di Anastasio, 09/01/2017 13:00

History

#1 Updated by Giulio Di Anastasio over 7 years ago

Forgot the attachment...

#2 Updated by Giulio Di Anastasio over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF