utils.cat_intersect_polygon#
- seismostats.utils.cat_intersect_polygon(cat: DataFrame, polygon_vertices: list[tuple]) DataFrame#
Returns a DataFrame containing only the rows with points inside a given polygon.
- Parameters:
cat – DataFrame with columns ‘latitude’ and ‘longitude’ containing the points to be checked.
polygon_vertices – List of (x, y) tuples representing the vertices of the polygon to be checked against.
- Returns:
filtered_cat – DataFrame containing only the rows with points inside the polygon.