sertit.rasters_rio.get_dim_img_path¶
- get_dim_img_path(dim_path: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path], img_name: str = '*') Union[cloudpathlib.cloudpath.CloudPath, pathlib.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)