~/morgan_herlocker

abouttwittergithubother posts

Convex Hull in Javascript

Using turf, we can a create convex hull from a set of points with just a few lines of javacript.

var t = require('turf')

t.load('../test/testIn/convexIn.geojson', function(err, points){
  t.convex(points, function(err, hull){
    if(err) throw err
    console.log(hull)
  })
})

Here is the input:

and here is the result:


1-15-14