Module rasters::align[][src]

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 A and B that don’t necessarily belong to the same raster, compute the unique pixel (k, l) of B that contains the center of the pixel (i, j) in A.

  • 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_transform into a function that maps input (integer) indices to indices on the output raster if it falls within the given dimension (dim), and otherwise None.

transform_between

Compute affine transform to transfer from pixel coordinates of the first dataset to the second dataset.

transform_window

Transforms a RasterWindow from one raster to another, possibly truncating to ensure the output is valid for the target raster. The rasters are expected to be axis-aligned.