gfail.spatial¶
Spatial functions used by all models
- gfail.spatial.trim_ocean2(grid2D, mask, all_touched=True, crop=False)[source]¶
Use the mask (a shapefile) to trim offshore areas
- Parameters
grid2D – MapIO grid2D object of results that need trimming
mask – list of shapely polygon features already loaded in or string of file extension of shapefile to use for clipping
all_touched (bool) – if True, won’t mask cells that touch any part of polygon edge
crop (bool) – crop boundaries of raster to new masked area
- Returns
grid2D file with ocean masked