18 lines
547 B
TypeScript
Executable File
18 lines
547 B
TypeScript
Executable File
import { BBox } from "@turf/helpers";
|
|
/**
|
|
* Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
|
|
*
|
|
* @name bbox
|
|
* @param {GeoJSON} geojson any GeoJSON object
|
|
* @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
|
|
* @example
|
|
* var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
|
|
* var bbox = turf.bbox(line);
|
|
* var bboxPolygon = turf.bboxPolygon(bbox);
|
|
*
|
|
* //addToMap
|
|
* var addToMap = [line, bboxPolygon]
|
|
*/
|
|
declare function bbox(geojson: any): BBox;
|
|
export default bbox;
|