Expand description
Align a pair of rasters by their geo. transform.
This module provides utilities to process a pair of rasters with geographic alignment:
-
Given two raster bands
AandBthat don’t necessarily belong to the same raster, compute the unique pixel(k, l)ofBthat contains the center of the pixel(i, j)inA. -
Extend the above functionality efficiently to work with chunks of
A.
Functions§
- chunk_
transform - Calculate residue of an transform for a pair of offsets. This is used to succinctly convert from array coordinates of a chunk of one raster, to the array coordinates of the corresponding chunk of another raster.
- index_
transformer - Converts a
chunk_transforminto a function that maps input (integer) indices to indices on the output raster if it falls within the given dimension (dim), and otherwiseNone. - transform_
between - Compute affine transform to transfer from pixel coordinates of the first dataset to the second dataset.
- transform_
window - Transforms a
RasterWindowfrom one raster to another, possibly truncating to ensure the output is valid for the target raster. The rasters are expected to be axis-aligned.