lsru.utils.bounds¶
-
lsru.utils.
bounds
(geom)[source]¶ Return a bounding box from a geometry
Adapted from https://gis.stackexchange.com/a/90554/17409
Parameters: geom (dict) – Geojson like geometry Example
>>> from lsru.utils import bounds >>> geom = {'coordinates': [[[3.34481, 43.96708], ... [6.17992, 45.23413], ... [5.55366, 43.56654], ... [3.34481, 43.96708]]], ... 'type': 'Polygon'} >>> print(bounds(geom))
Returns: Bounding box (left, bottom, right, top) Return type: Tuple