geost.base.Collection.select_within_polygons#

Collection.select_within_polygons(polygons: str | Path | GeoDataFrame | GeometryType, buffer: float | int = 0, invert: bool = False)[source]#

Select all data that lie within given polygon geometries.

Parameters:
  • polygons (str | Path | gpd.GeoDataFrame | PolygonGeometries) – Any type of polygon geometries that can be used for the selection: GeoDataFrame containing polygons or filepath to a shapefile like file, or Shapely Polygon, MultiPolygon or list containing Polygon objects.

  • buffer (float | int, optional) – Optional buffer distance around the polygon selection geometries. The default is 0.

  • invert (bool, optional) – Invert the selection, selects all data that lie outside the selection polygons.

Returns:

New Collection instance containing only the surveys that are located within the given polygon geometries.

Return type:

Collection