bbox
Description
Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
Parameters
Name | Type | Description |
---|---|---|
geojson | GeoJSON | any GeoJSON object |
Returns
BBox bbox extent in [minX, minY, maxX, maxY] order
Examples
var line = turf.lineString([
[-74, 40],
[-78, 42],
[-82, 35],
]);
var bbox = turf.bbox(line);
var bboxPolygon = turf.bboxPolygon(bbox);