diff --git a/xarray/backends/rasterio_.py b/xarray/backends/rasterio_.py index cc533cc3ad0..6b5908993c2 100644 --- a/xarray/backends/rasterio_.py +++ b/xarray/backends/rasterio_.py @@ -313,6 +313,12 @@ def open_rasterio(filename, parse_coordinates=None, chunks=None, cache=None, if hasattr(riods, 'units') and any(riods.units): # A list of units string for each dataset band attrs['units'] = riods.units + if hasattr(riods, 'colormap'): + # A dict containing the colormap for a band + attrs['colormap'] = riods.colormap(1) + if hasattr(riods, 'colorinterp') and any(riods.colorinterp): + # A tuple of the band's colorinterp property + attrs['colorinterp'] = riods.colorinterp # Parse extra metadata from tags, if supported parsers = {'ENVI': _parse_envi}