# bbox

Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
获取一组feature,计算所有featurebbox,并返回一个边界框。

参数

参数 类型 描述
geojson GeoJSON 任何 GeoJSON 对象

返回

BBox - bbox在minX, minY, maxX, maxY顺序中的扩展

示例

var line = turf.lineString([
        [104.99467, 30.071677],
        [107.13797, 36.550462],
        [112.607082, 34.991467]
      ]);
var bbox = turf.bbox(line);
var bboxPolygon = turf.bboxPolygon(bbox);

npm install @turf/bbox

Last Updated: 6/21/2023, 11:40:17 PM