Calculating area of polygon shapefile and output data in QGIS
Area calculation is one of the commonly used functions in GIS, and this article will introduce several different ways of calculating area.
Tools for area calculation
- Identify Features
- Expression of $area Function
- Create virtual field
Identify Features
Select the Identify Features (Shortcut: Ctrl+Shift+I) and click on the polygon.
Expression of area Function
Layer > Properties > Field calculator
Enter the field name and expression in the field calculator.
Output field name: Area
Enter in the expression: $area
If you need a more precise value, select the decimal number (real) in the category and set the precision (Length, Precision).
Export Area data
Right-click on the layer to export it as a csv data, export the data of the vector layer as a CSV file. Select the archive location and make sure the Area field is selected.
Deselect "Add to map" and you will see the size of each symbol in the exported CSV file.
Calculate the area of all polygons on the layer
Enter sum($area) in the expression to get the total area of the layer.
Enter $area in the expression to get the area of single polygon.
Create virtual field
Create virtual fields to display the area in real time when drawing shapes on the map.xi virus
Knowing bug: Using sum($area) will cause an error if only virtual layers exist in the layer.
Calculation of area in different coordinate systems
The following is an example of how to calculate the area of the EPSG:3857 coordinate system on the map of EPSG:4326. Select the layer and open the Field Calculator and enter the following formula to add the Area field.
area(transform($geometry,'EPSG:4326','EPSG:3857'))
Read more
面積計算、Cartesian 與 Ellipsoidal 的意義 - QGIS
留言