package
Calculates the geodesic area in square meters of one or more polygons.
npm install @turf/areaGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Calculates the geodesic area in square meters of one or more polygons.
geojson GeoJSON input polygon(s) as Geometry, Feature, or FeatureCollectionvar polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);
var area = turf.area(polygon);
//addToMap
var addToMap = [polygon]
polygon.properties.area = areaReturns number area in square meters
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this single module individually:
$ npm install @turf/areaOr install the all-encompassing @turf/turf module that includes all modules as functions:
$ npm install @turf/turftmcw
tom@macwright.com
Estimated unpacked size across 5 packages.
558.0 kB
Includes dependencies.
4 direct dependencies.