geost.spatial.select_points_within_bbox#

geost.spatial.select_points_within_bbox(gdf: str | Path | GeoDataFrame, xmin: float | int, ymin: float | int, xmax: float | int, ymax: float | int, invert: bool = False) GeoDataFrame[source]#

Make a selection of point geometries based on a user-given bounding box.

Parameters:
  • gdf (str | Path | gpd.GeoDataFrame) – Geodataframe (or file that can be parsed to a geodataframe) to select from.

  • xmin (float | int) – Minimum x-coordinate of the bounding box.

  • ymin (float | int) – Minimum y-coordinate of the bounding box.

  • xmax (float | int) – Maximum x-coordinate of the bounding box.

  • ymax (float | int) – Maximum y-coordinate of the bounding box.

  • invert (bool, optional) – Invert the selection, so select all objects outside of the bounding box in this case, by default False.

Returns:

Geodataframe containing only selected geometries.

Return type:

gpd.GeoDataFrame