convexhull
v1.0.7
Published
convex hull 2D Andrew's monotone algorithm
Downloads
11
Readme
convexhull
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
| option | desc | default | | ------------- |:--------------:| ------------| | x | property key x | 'longitude' | | y | property key y | 'latitude' |