polartoolkit.points_inside_region#
- points_inside_region(df, region, names=('x', 'y'), reverse=False)[source]#
return a subset of a dataframe which is within a region
- Parameters:
df (pandas.DataFrame) โ dataframe with coordinate columns to use for defining if within region
region (tuple[float, float, float, float]) โ bounding region in format [xmin, xmax, ymin, ymax] for bounds of new subset dataframe
names (tuple[str, str], optional) โ column names to use for x and y coordinates, by default (โxโ, โyโ) or (โeastingโ, โnorthingโ)
reverse (bool, optional) โ if True, will return points outside the region, by default False
- Returns:
returns a subset dataframe
- Return type: