Efficiently computes a GeoJSON's bounding box.
npm install geojson-bounding-box



Efficiently computes a GeoJSON's bounding box using a generator to traverse its
coordinates.
``bash`
npm install --save geojson-bounding-box
`javascript
const toBBox = require('geojson-bounding-box');
const line = {
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[0, 1], [1, 2], [2, 1]
]
},
"properties": {}
};
const bbox = toBBox(line);
// = [0, 1, 2, 2]
`
To build and test the library locally:
`shell``
npm install
npm test
Copyright (c) 2019 Daniel Pulido
Source code is released under the MIT License.