geoutils.Raster.intersection

geoutils.Raster.intersection#

Raster.intersection(raster, match_ref=True)[source]#

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

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

:param rst : path to the second image (or another Raster instance) :type match_ref: bool :param match_ref: 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 :rtype: tuple[float, float, float, float] :returns: extent of the intersection between the 2 images (xmin, ymin, xmax, ymax) in self’s coordinate system.