lengthToDegrees
Description
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
Parameters
Name | Type | Description |
---|---|---|
distance | number | in real units |
units? | Units | can be degrees, radians, miles, inches, yards, metres, meters, kilometres, kilometers. (default "kilometers") |
Returns
number degrees
Installation
$ npm install @turf/helpers
import { lengthToDegrees } from "@turf/helpers";
const result = lengthToDegrees(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.lengthToDegrees(...);