# convertArea

Converts a area to the requested unit. Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
将面积转换为请求的单位。有效的单位有:kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares。

> npm install @turf/helpers

参数

参数 类型 描述
area number 待转换的面积
originalUnit string 原单位
finalUnit string 目标单位

返回

number - 换算后的距离

turf.convertArea(1000000, 'meters', 'kilometers'); // 1
Last Updated: 4/10/2024, 11:27:54 PM