# convex

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

参数

参数 类型 描述
geojson GeoJSON Feature 或 FeatureCollection
options Object 可选参数:见下文

options选项

属性 类型 默认值 描述
concavity number Infinity 1 - thin shape. Infinity - 凸多边形

返回

Feature <Polygon> - 凸多边形

示例

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: 7/3/2023, 9:59:14 PM