lineArc
Description
Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; 0 bearing is North of center point, positive clockwise.
Parameters
Name | Type | Description |
---|---|---|
center | Coord | center point |
radius | number | radius of the circle |
bearing1 | number | angle, in decimal degrees, of the first radius of the arc |
bearing2 | number | angle, in decimal degrees, of the second radius of the arc |
options? | Object | Optional parameters (default {}) |
options.steps? | number | number of steps (default 64) |
options.units? | string | miles, kilometers, degrees, or radians (default 'kilometers') |
Returns
Feature<LineString> line arc
Examples
var center = turf.point([-75, 40]);
var radius = 5;
var bearing1 = 25;
var bearing2 = 47;
var arc = turf.lineArc(center, radius, bearing1, bearing2);
Installation
$ npm install @turf/line-arc
import { lineArc } from "@turf/line-arc";
const result = lineArc(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.lineArc(...);