geoutils.Raster.intersection

geoutils.Raster.intersection#

Raster.intersection(other, match_ref=True)#

Returns the bounding box of intersection between this raster and another.

If the rasters have different projections, the intersection extent is given in self’s projection system.

Parameters:
  • other (TypeVar(RasterType, bound= RasterBase)) – Path to second raster.

  • match_ref (bool) – If set to True, returns the smallest intersection that aligns with that of self, i.e. same resolution and offset with self’s origin is a multiple of the resolution

Return type:

tuple[float, float, float, float]

Returns:

Extent of the intersection between the 2 raster (xmin, ymin, xmax, ymax) in self’s coordinate system.