wradlib.zonalstats.get_clip_mask#
- wradlib.zonalstats.get_clip_mask(coords, clippoly, *, crs=None)[source]#
Returns boolean mask of points
coordsinside polygonclippoly- Parameters:
coords (
numpy.ndarray) – array of xy coords with shape […,2]clippoly (
numpy.ndarray) – array of xy coords with shape (N,2) representing closed polygon coordinatescrs – Coordinate Reference System (CRS) of coordinates. Can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.crs.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
- Returns:
src_mask (
numpy.ndarray) – boolean array of shape coords.shape[0:-1]