boundingBox
The smallest box holding every position of a geometry, as
[west, south, east, north]. Heights are ignored.
This is a function exported by @mapcairn/core, checked against version 0.2.0.
Signature
import { boundingBox } from "@mapcairn/core";
function boundingBox(input: GeometryInput): BoundingBox;
Description
Longitude is treated as a flat axis, as GeoJSON does. A shape that crosses
the antimeridian must be split at 180 degrees, and the box of its pieces
then spans the whole way round (west -180, east 180) rather than the
short way across. Use boundingBoxToBounds for the shape the map port
takes.
Parameters
input(GeometryInput)
Returns
BoundingBox
Throws
GeometryErrorof kindinvalidfor a malformed geometry,emptywhen it has no positions.