bounds#
- geodesic.boson.bounds(input_collection=None, output_collection=None)[source]#
Calculate the bounds of the queried geometry.
This middleware will calculate the bounds of the geometry and return it in a new collection called “bounds”. The bounds in this case are a rectangle that encloses the geometry. In the case of multi-geometries, the bounds of the entire geometry will be calculated.
When creating this middleware, most of the time you will want to apply it after any filtering happens, so that the centroid is calculated on the filtered geometry.
- Parameters:
- Returns:
middleware to calculate the bounds of the queried geometry
- Return type:
Examples
>>> # Add the bounds middleware to a dataset view >>> ds_with_bounds = ds.view( ... middleware=[ ... bounds() ... ] ... )