Skip to main content

level_transforms

Function level_transforms 

Source
pub fn level_transforms(
    base: impl Into<Affine>,
    levels: &[usize],
    offsets: (usize, usize),
) -> HashMap<i32, Affine>
Expand description

Level transforms of a tile, keyed by level, anchored like rastio.read_raster: base * Affine.scale(level) * Affine.translation(col0 // level, row0 // level), with the affine package’s operation order.

base is the full raster’s base-level transform and offsets the tile’s (row0, col0) in base pixels, so level L maps the tile’s overview grid, whose cell (0, 0) is global overview cell (row0 / L, col0 / L), and level 1 maps the tile itself.