holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
597 stars 77 forks source link

Add alpha dimension #671

Closed ahuang11 closed 3 months ago

ahuang11 commented 1 year ago

Fixes https://github.com/holoviz/geoviews/issues/571

import rioxarray
import geoviews as gv
gv.extension('bokeh')

ds = rioxarray.open_rasterio("test_alpha.tiff")
gv.util.from_xarray(ds, nan_nodata=True)
image

This is the most direct way to fix it, but there is also alpha_dimension here https://github.com/holoviz/holoviews/blob/main/holoviews/element/raster.py#L620-L626, which currently does not support xarray Dataset.

philippjfr commented 4 months ago

Seems like there's something missing here, this only adds the test.