# lengthToDegrees

Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
将实际单位的距离测量值(假设地球为球体)转换为弧度。有效单位包括:miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet。

> npm install @turf/helpers

参数

参数 类型 描述
distance number in real units
units string 可以是 degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.

返回

number - degrees

turf.lengthToDegrees(6671704.814011974, 'meters'); // 60
Last Updated: 4/10/2024, 11:27:54 PM