convertArea
Description
Converts a area to the requested unit. Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares
Parameters
Name | Type | Description |
---|---|---|
area | number | to be converted |
originalUnit? | Units | of the distance (default "meters") |
finalUnit? | Units | returned unit (default "kilometers") |
Returns
number the converted area
Installation
$ npm install @turf/helpers
import { convertArea } from "@turf/helpers";
const result = convertArea(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.convertArea(...);