# envelope

Takes any number of features and returns a rectangular Polygon that encompasses all vertices.
接受任意数量的 feature,并返回一个包含所有顶点的矩形多边形。

参数

参数 类型 描述
geojson GeoJSON input features

返回

Feature <Polygon> - 一个包含所有顶点的矩形多边形

示例

var features = turf.featureCollection([
  turf.point([-75.343, 39.984], {"name": "Location A"}),
  turf.point([-75.833, 39.284], {"name": "Location B"}),
  turf.point([-75.534, 39.123], {"name": "Location C"})
]);

var enveloped = turf.envelope(features);
Last Updated: 6/23/2023, 10:33:35 PM