Files
turftracker/frontend/node_modules/@turf/area/dist/js/index.d.ts
2026-04-09 13:19:47 -05:00

18 lines
582 B
TypeScript
Executable File

import { Feature, FeatureCollection, Geometry } from "@turf/helpers";
/**
* Takes one or more features and returns their area in square meters.
*
* @name area
* @param {GeoJSON} geojson input GeoJSON feature(s)
* @returns {number} area in square meters
* @example
* var 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 = area
*/
export default function area(geojson: Feature<any> | FeatureCollection<any> | Geometry): number;