GeoEco.DataManagement.ArcGISRasters.ArcGISRaster.ExtractByMaskList
- classmethod ArcGISRaster.ExtractByMaskList(inputRasterList, mask, outputRasterList, skipExisting=False, overwriteExisting=False, basePath=None)
For each ArcGIS raster in a list, extracts the cells that correspond to the areas defined by a mask.
This function just calls the ArcGIS Spatial Analyst’s
ExtractbyMask()tool with the extraction_area set toINSIDE. This function only exists so that we can easily create a batched version of that tool.Requires: ArcGIS Pro 3.2.0 or later or ArcGIS Server equivalent to ArcGIS Pro 3.2.0 or later, ArcGIS ‘spatial’ extension.
- Parameters:
mask (
str) – Input mask data defining areas to extract. This can be a raster or feature dataset. When it is is a raster, NoData cells on it will be assigned NoData values on the output raster. Minimum length꞉ 1. Must exist.outputRasterList (
listofstr) – List of output rasters to receive the cell values extracted from the input rasters. If these paths refers to the file system, missing directories in the paths will be created if they do not exist.skipExisting (
bool, optional) – If True, processing will be skipped for output rasters that already exist.overwriteExisting (
bool, optional) – If True and skipExisting is False, existing output rasters will be overwritten.basePath (
str, optional) –Base path to prepend to relative paths.
If any of the input paths (or output paths, if this method has outputs) contained in the lists are relative paths, they will be converted to absolute paths prior to processing, as follows:
If a base path is provided, it will be prepended to the relative path.
Otherwise, if the ArcGIS geoprocessor has been initialized and the geoprocessing workspace has been set (i.e.
arcpy.env.Workspaceis not and empty string or None), it will be prepended to the relative path.Otherwise, the current working directory for the executing process will be prepended to the path.
Minimum length꞉ 1.