# bbox

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

参数

参数 类型 描述
geojson GeoJSON any GeoJSON object

返回

BBox - bbox extent in minX, minY, maxX, maxY order

示例

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