Skip to main content
Version: Next

destination

Description

Takes a Point and calculates the location of a destination point given a distance in degrees, radians, miles, or kilometers; and bearing in degrees. This uses the Haversine formula to account for global curvature.

Parameters

NameTypeDescription
originCoordstarting point
distancenumberdistance from the origin point
bearingnumberranging from -180 to 180
options?ObjectOptional parameters (default {})
options.units?stringmiles, kilometers, degrees, or radians (default 'kilometers')
options.properties?ObjectTranslate properties to Point (default {})

Returns

Examples

var point = turf.point([-75.343, 39.984]);
var distance = 50;
var bearing = 90;
var options = { units: "miles" };

var destination = turf.destination(point, distance, bearing, options);

Installation

$ npm install @turf/destination

import { destination } from "@turf/destination";
const result = destination(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.destination(...);