calculate_area

Luo_Suppe2026-08-15

gma.smc.query.calculate_area

function calculate_area(points, in_crs = "WGS84", unit = "square meter"):

Calculate the area of the polygon formed by the input multipoints.

Parameters:

points: list||tuple||array.

The X (longitude), Y (latitude) coordinates of the vertices of the polygon need to be calculated.

For example: points = [(130.1, 45.2), (131.5, 40.2), (131.5, 45.2)]

Optional:

in_crs = str||int||aclassofgmaCoordinateReferenceSystem. Default 'WGS84'.

Coordinate system. Can be EPSG, WKT, Proj4, and other types of coordinate characters or CoordinateReferenceSystem class.

unit = str. Default 'square meter'.

The unit in which to calculate the area result.

Other supported units: 'square meter', 'square millimeter', 'square centimeter', 'square decimeter', 'square kilometer', 'hectare', 'acre', 'mu'.

Returns:

Type: array.


Last Updated 8/15/2026, 8:42:21 AM