turf-arc
v1.0.0
Published
Calculate great circles routes as lines
Downloads
4
Maintainers
Readme
turf-arc
Calculate great circles routes as lines
turf.arc(from, to, properties, npoints, options.offset)
Calculate great circles routes as lines
Parameters
| 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
| Number | offset 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