get_dim_img_path

Contents

get_dim_img_path#

get_dim_img_path(dim_path: Union[str, CloudPath, Path], img_name: str = '*') list[source]#

Get the image path from a BEAM-DIMAP data.

A BEAM-DIMAP file cannot be opened by rasterio, although its .img file can.

>>> dim_path = "path/to/dimap.dim"  # BEAM-DIMAP image
>>> img_path = get_dim_img_path(dim_path)

>>> # Read raster
>>> raster, meta = read(img_path)
Parameters:
  • dim_path (AnyPathStrType) – DIM path (.dim or .data)

  • img_name (str) – .img file name (or regex), in case there are multiple .img files (ie. for S3 data)

Returns:

.img files as a list

Return type:

list