geoutils.Raster.translate

geoutils.Raster.translate#

Raster.translate(xoff, yoff, distance_unit='georeferenced', inplace=False)[source]#

Translate a raster by a (x,y) offset.

The translation only updates the geotransform (no resampling is performed).

Parameters:
  • xoff (float) – Translation x offset.

  • yoff (float) – Translation y offset.

  • distance_unit (Literal['georeferenced', 'pixel']) – Distance unit, either ‘georeferenced’ (default) or ‘pixel’.

  • inplace (bool) – Whether to modify the raster in-place.

Return type:

Optional[TypeVar(RasterType, bound= Raster)]

Returns:

Translated raster (or None if inplace).