geodata.Mask.save_mask

geodata.Mask.save_mask#

geodata.Mask.save_mask(name: str | None = None, mask_dir: str | None = None, close_files: bool = False)#

Save a mask object to the directory. By default, the directory should be the MASK_DIR in config.py.

Note: It is recommended that multiple masks would not be opened at the same time to avoid permission issues.

Parameters:
  • name (str) – Name of the mask object to be saved. If not specified, use the name stored in this object.

  • mask_dir (str) – Path to save the mask to. By default, use the value in mask_dir attribute.

  • close_files (bool) – Whether the program will close all the opened raster files after saving them. This will disable further save_mask() call. False by default.