Calculate great circles routes as lines
Calculate great circles routes as lines
parameter | type | description |
---|---|---|
from |
Object | source point feature |
to |
Object | destination point feature |
properties |
Object | line feature properties |
npoints |
Number | number of points |
options.offset |
Object | offset from dateline in degrees |
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
Requires nodejs.
$ npm install turf-arc
$ npm test