3.0.12 • Published 9 years ago
turf-convex v3.0.12
turf-convex
turf.convex(input)
Takes any GeoJSON object and returns a convex hull polygon.
Internally this implements a Monotone chain algorithm.
Parameters
parameter | type | description |
---|---|---|
input | GeoJSON | any GeoJSON object |
Example
var points = turf.featurecollection([
turf.point([10.195312, 43.755225]),
turf.point([10.404052, 43.8424511]),
turf.point([10.579833, 43.659924]),
turf.point([10.360107, 43.516688]),
turf.point([10.14038, 43.588348]),
turf.point([10.195312, 43.755225])]);
var hull = turf.convex(points);
var result = turf.featurecollection(
points.features.concat(hull));
//=result
Returns Feature
, a Polygon feature
Installation
Requires nodejs.
$ npm install turf-convex
Tests
$ npm test
3.0.12
9 years ago
3.0.10
9 years ago
3.0.7-canary.ae89c8b3
9 years ago
3.0.7
9 years ago
3.0.5
9 years ago
3.0.1
9 years ago
3.0.0-canary.7879bf6c
9 years ago
3.0.0-canary.2f5f7167
9 years ago
1.0.1
10 years ago
1.0.0
11 years ago
0.1.1
11 years ago
0.0.2
11 years ago
0.1.0
11 years ago
0.0.1
11 years ago
0.0.0
11 years ago