geoutils.raster.load_multiple_rasters

geoutils.raster.load_multiple_rasters#

geoutils.raster.load_multiple_rasters(raster_paths, crop=True, ref_grid=None, **kwargs)[source]#

Function to load multiple rasters at once in a memory efficient way. First load metadata only. Optionally, crop all rasters to their intersection (default). Optionally, reproject all rasters to the grid of one raster set as reference (after optional crop). Otherwise, simply load the full rasters.

Parameters:
  • raster_paths (list[str]) – List of paths to the rasters to be loaded.

  • crop (bool) – If set to True, will only load rasters in the area they intersect.

  • ref_grid (int | None) – If set to an integer value, the raster with that index will be considered as the reference and all other rasters will be reprojected on the same grid (after optional crop).

  • kwargs (Any) – Optional arguments to be passed to Raster.reproject, e.g. the resampling method.

Return type:

list[TypeVar(RasterType, bound= Raster)]

Returns:

List of loaded Raster instances.