1.0.7 • Published 7 years ago

convexhull v1.0.7

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

convexhull

npm version Build Status

convex hull 2D algorithm using monotone chain algorithm

usage

const convexhull = require('convexhull')(/*options*/{x: 'lng', y: 'lat'});

const points = [
  {
    lng: 121.409058,
    lat: 31.191149
  },
  ...
];

let hull = convexhull(points);

// for unsorted points
hull = convexhull(points, true);

Options

optiondescdefault
xproperty key x'longitude'
yproperty key y'latitude'

Reference

MonotoneChain

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago