revrt.costs.cli.build_masks#

build_masks(land_mask_shp_fp, template_file, masks_dir, reproject_vector=True, chunks='auto')[source]#

Build masks from land vector file

Parameters:
  • land_mask_shp_fp (path-like) – Path to land polygon GPKG or shp file.

  • template_file (path-like) – Path to template GeoTIFF (*.tif or *.tiff) or Zarr (*.zarr) file containing the profile and transform to be used for the masks.

  • masks_dir (path-like) – Directory to output mask GeoTIFFs.

  • reproject_vector (bool, default True) – Option to reproject CRS of input land vector file to match CRS of template file. By default, True.

  • chunks (str, optional) – Chunk size to use when reading the template file. This will be passed down as the chunks argument to rioxarray.open_rasterio() or xarray.open_dataset(). By default, "auto".