raster_tools.clipping.erase#
- raster_tools.clipping.erase(feature, data_raster, bounds=None)[source]#
Erase the data raster using the given feature. Inverse of
clip()
.- Parameters
feature (str, Vector) – The feature to erase with. If a string, this is interpreted as a path.
data_raster (str, Raster) – The data raster to be erased. If a string, this is interpreted as a path.
bounds (tuple, list, array, optional) – The bounding box of the clip operation: (minx, miny, maxx, maxy). If not provided, the bounds are computed from the feature. This will trigger computation of the feature.
- Returns
The resulting erased raster with dimensions that match the bounding box provided or the bounds of the feature. The data inside the feature is erased.
- Return type
Raster