@turf/line-arc
TypeScript icon, indicating that this package has built-in type declarations

7.1.0 • Public • Published

@turf/line-arc

lineArc

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

  • 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 (optional, default {})

    • options.steps number number of steps (straight segments) that will constitute the arc (optional, default 64)
    • options.units string miles, kilometers, degrees, or radians (optional, default 'kilometers')

Examples

var center = turf.point([-75, 40]);
var radius = 5;
var bearing1 = 25;
var bearing2 = 47;

var arc = turf.lineArc(center, radius, bearing1, bearing2);

//addToMap
var addToMap = [center, arc]

Returns Feature<LineString> line arc


This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.

Installation

Install this single module individually:

$ npm install @turf/line-arc

Or install the all-encompassing @turf/turf module that includes all modules as functions:

$ npm install @turf/turf

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.1.0117,886latest
7.1.0-alpha.708prerelease

Version History

VersionDownloads (Last 7 Days)Published
7.1.0117,886
7.1.0-alpha.708
7.1.0-alpha.765
7.0.019,384
7.0.0-alpha.116606
7.0.0-alpha.115206
7.0.0-alpha.114115
7.0.0-alpha.11329
7.0.0-alpha.11121
7.0.0-alpha.11011
7.0.0-alpha.22,687
7.0.0-alpha.15
7.0.0-alpha.0156
6.5.0212,214
6.4.0823
6.3.0761
6.2.06
6.2.0-alpha.36
6.2.0-alpha.21
6.2.0-alpha.10
6.0.024
5.1.5333,091
5.1.01
5.0.40
4.7.3164
4.7.10
4.7.00
4.6.00
4.5.20
4.5.10
4.4.00
4.3.010
4.2.00
4.1.00
4.0.00

Package Sidebar

Install

npm i @turf/line-arc

Weekly Downloads

688,280

Version

7.1.0

License

MIT

Unpacked Size

18.1 kB

Total Files

9

Last publish

Collaborators

  • smallsaucepan
  • morgan.herlocker
  • twelch
  • jamesmilneruk
  • rowanwins
  • tmcw
  • morganherlocker
  • tcql
  • mdfedderly