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 (
DataFrame|GeoDataFrame) โ dataframe with coordinate columns specified by coord_names to use for defining if within shapefileshapefile (
GeoDataFrame) โ shapefile to use for defining if point are within it or notcrs (
str|None) โ if points is not a geodataframe, crs to use to convert into a geodataframe, by default Nonecoord_names (
tuple[str,str] |None) โ names of coordinate columns, by default โxโ and โyโ or โeastingโ and โnorthingโhemisphere (
str|None) โ set projection based on โnorthโ or โsouthโ hemispheres, by default Noneepsg (
str|None) โ set projection from EPSG code string (โ3031โ), by default None
- Returns:
returns a subset dataframe
- Return type: