measure_area
Measure polygon area in square metres, per feature and total, with geodesic or planar methods. Repairs invalid geometry before measuring and flags projection distortion.
Instructions
Area per feature in SQUARE METRES, written to a named column, with the total in the result.
method='geodesic' (default) measures ground area on the ellipsoid the layer's CRS names: no map plane, so no projection distortion. method= 'planar' measures in the layer's own CRS and converts with its declared linear unit — a layer in US survey feet is not assumed to be in metres — and is refused on a geographic CRS, where an area would be in square degrees.
Two things this tool does that a bare area call cannot: invalid geometry is
repaired BEFORE measuring (the planar area of a self-intersecting ring is
the signed shoelace, a number matching no region, returned without
complaint) and every repair is recorded; and a planar measurement is
compared against the ground area, so a plane that is not equal-area here
comes back with a warnings entry carrying the ratio — Web Mercator at 42°
reports 1.80× the land it covers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | geodesic | |
| input_path | Yes | ||
| area_column | No | area_m2 | |
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||