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 (
DataFrame) โ dataframe with coordinate columns to use for defining if within regionregion (
tuple[float,float,float,float]) โ bounding region in format [xmin, xmax, ymin, ymax] for bounds of new subset dataframenames (
tuple[str,str]) โ column names to use for x and y coordinates, by default (โxโ, โyโ) or (โeastingโ, โnorthingโ)reverse (
bool) โ if True, will return points outside the region, by default False
- Returns:
returns a subset dataframe
- Return type: