1.0.0 • Published 8 years ago

turf-arc v1.0.0

Weekly downloads
8
License
BSD-2-Clause
Repository
github
Last release
8 years ago

turf-arc

build status

Calculate great circles routes as lines

turf.arc(from, to, properties, npoints, options.offset)

Calculate great circles routes as lines

Parameters

parametertypedescription
fromObjectsource point feature
toObjectdestination point feature
propertiesObjectline feature properties
npointsNumbernumber of points
options.offsetNumberoffset from dateline in degrees

Example

var arc = require('turf-arc');
var from = { type: 'Point', coordinates: [-122, 48] };
var to = { type: 'Point', coordinates: [-77, 39] };
var line = arc(from, to, { 'name': 'Seattle to DC' }, 100, { offset: 10 });
//=line

Returns Object, arc line feature

Installation

Requires nodejs.

$ npm install turf-arc

Tests

$ npm test