Skip to main content

Module resample

Module resample 

Source
Expand description

Resampling kernels — the math that makes pyramid building and raster warp possible.

§API shape

Two layers of API:

  • Point sampling (sample_*): given a band + fractional (x, y) in source pixel space, return the resampled value. Used by warp to map one output pixel to its source value.
  • Tile-to-tile (resample_tile): given a whole source RasterTile + target dimensions, return a new RasterTile resampled across all bands. Used by pyramid to downsample for overview levels.

§Kernels covered

Functions§

resample_tile
Resize a RasterTile to new (target_width, target_height). Used by pyramid building and warp output preparation.
sample
Sample one fractional (x, y) from band using the chosen method.