Skip to main content
Version: Next

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

NameTypeDescription
distancenumberin real units
units?Unitscan 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(...);