area
Description
Calculates the geodesic area in square meters of one or more polygons.
Parameters
Name | Type | Description |
---|---|---|
geojson | GeoJSON | input polygon(s) as Geometry, Feature, or FeatureCollection |
Returns
number area in square meters
Examples
var polygon = turf.polygon([
[
[125, -15],
[113, -22],
[154, -27],
[144, -15],
[125, -15],
],
]);
var area = turf.area(polygon);
Installation
$ npm install @turf/area
import { area } from "@turf/area";
const result = area(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.area(...);