spatialdata.bounding_box_query(element, axes, min_coordinate, max_coordinate, target_coordinate_system, filter_table=True, **kwargs)#

Query a SpatialData object or SpatialElement within a bounding box.

  • axes (tuple[str, ...]) – The axes min_coordinate and max_coordinate refer to.

  • min_coordinate (list[Union[int, float]] | ndarray[Any, dtype[float64]]) – The minimum coordinates of the bounding box.

  • max_coordinate (list[Union[int, float]] | ndarray[Any, dtype[float64]]) – The maximum coordinates of the bounding box.

  • target_coordinate_system (str) – The coordinate system the bounding box is defined in.

  • filter_table (bool (default: True)) – If True, the table is filtered to only contain rows that are annotating regions contained within the bounding box.

Return type:

Union[DataArray, DataTree, GeoDataFrame, DataFrame, SpatialData, None]


: The SpatialData object or SpatialElement containing the requested data. Eventual empty Elements are omitted by the SpatialData object.