# convex

Takes a Feature or a FeatureCollection and returns a convex hull Polygon.
获取一个FeatureFeatureCollection,并返回一个凸多边形。

参数

参数 类型 描述
geojson GeoJSON input Feature or FeatureCollection
options Object Optional parameters: see below

options选项

属性 类型 默认值 描述
concavity number Infinity 1 - thin shape. Infinity - convex hull.

返回

Feature <Polygon> - a convex hull

示例

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);
Last Updated: 1/19/2021, 10:59:20 AM