get_dim_img_path(dim_path: Union[str, CloudPath, Path], img_name: str = '*') Union[CloudPath, Path][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)
  • dim_path (Union[str, CloudPath, Path]) – DIM path (.dim or .data)

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


.img file

Return type:

Union[CloudPath, Path]