girs.rastfeat.clip.clip_by_extent

clip_by_extent(raster_in, **kwargs)

Clip the raster by extent

If output_raster is not set in kwargs, return the new rasters dataset as MEM driver, otherwise None

Parameters:
  • raster_in
  • kwargs
    key extent:(list): [x_min, x_max, y_min, y_max] is the extent in world coordinates
    key layers:(string / Layers): layers file name or LayersSet object used to get the extent
    key rasters:(string / Layers): rasters file name or Raster object used to get the extent
    key layer_number:
     (int): layer number, only used if layers is defined. Default is the first layer (0)
    key scale:(float): scale the extent: scale > 1 creates a buffer
    key driver:(string): driver short name
    key output_raster:
     (string): filename of the rasters.
Returns: