⚠️ Our 0.1 release refactored several early-development functions for long-term stability, to update your code see here. ⚠️
Future changes will come with deprecation warnings! 🙂

geoutils.Raster.shift

Contents

geoutils.Raster.shift#

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

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

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

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

  • yoff (float) – Translation y offset.

  • distance_unit (Union[Literal['georeferenced'], Literal['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:

Shifted raster (or None if inplace).