geodata.Mask.crop_layer

geodata.Mask.crop_layer#

geodata.Mask.crop_layer(layer_name: str, bounds: tuple[float, float, float, float], lat_lon_bounds: bool = True, dest_layer_name: str | None = None)#

Crop a layer of mask object using crop_raster method.

Parameters:
  • layer_name (str) – The name of the layer to be cropped.

  • bounds (tuple) – The bounds of the cropped layer. The order of the bounds should be (left, right, bottom, top).

  • lat_lon_bounds (bool) – Whether the bounds are in latitude/longitude coordinates. By default this is set to True.

  • dest_layer_name (str) – The name of the cropped layer. If not specified, the cropped layer will replace the original layer.