raster_tools.clipping.envelope#

raster_tools.clipping.envelope(feature, data_raster)[source]#

Clip the data raster using the bounds of the given feature.

This is the same as clip() but the bounding box of the feature is used instead of the feature itself.

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 clipped. If a string, this is interpreted as a path.

Returns

The resulting clipped raster with dimensions that match the bounding box of the feature.

Return type

Raster