polartoolkit.points_inside_shapefile#
- points_inside_shapefile(points, shapefile, crs=None, coord_names=None, hemisphere=None, epsg=None)[source]#
return a subset of a dataframe which is located inside a shapefile.
- Parameters:
points (pandas.DataFrame | geopandas.GeoDataFrame) โ dataframe with coordinate columns specified by coord_names to use for defining if within shapefile
shapefile (geopandas.GeoDataFrame) โ shapefile to use for defining if point are within it or not
crs (str | None, optional) โ if points is not a geodataframe, crs to use to convert into a geodataframe, by default None
coord_names (tuple[str, str] | None, optional) โ names of coordinate columns, by default โxโ and โyโ or โeastingโ and โnorthingโ
hemisphere (str, optional,) โ set projection based on โnorthโ or โsouthโ hemispheres, by default None
epsg (str | None, optional) โ set projection from EPSG code string (โ3031โ), by default None
- Returns:
returns a subset dataframe
- Return type: