geost.spatial.select_points_within_polygons#
- geost.spatial.select_points_within_polygons(gdf: str | Path | GeoDataFrame, polygon_gdf: str | Path | GeoDataFrame, buffer: float | int = 0, invert: bool = False) GeoDataFrame [source]#
Make a selection of point geometries based on polygon geometries and an optional buffer.
- Parameters:
gdf (str | Path | gpd.GeoDataFrame) – Geodataframe (or file that can be parsed to a geodataframe) to select from.
polygon_gdf (str | Path | gpd.GeoDataFrame) – Geodataframe (or file that can be parsed to a geodataframe) to select with.
buffer (float | int, optional) – Optional buffer distance around the polygon selection geometries, by default 0.
invert (bool, optional) – Invert the selection, by default False.
- Returns:
Geodataframe containing only selected geometries.
- Return type:
gpd.GeoDataFrame