Skip to main content
Version: 6.5.0

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?stringcan 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(...);