Skip to main content
Version: 7.0.0

convertArea

Description

Converts a area to the requested unit. Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares

Parameters

NameTypeDescription
areanumberto be converted
originalUnit?Unitsof the distance (default "meters")
finalUnit?Unitsreturned 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(...);