-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error with Canvas().raster
on xarray 0.17
#990
Comments
Same issue as holoviz/hvplot#563 . Proposed fixes welcome; I don't know where to find |
I'm afraid it depends on the data source. This is the result of the 'open_rasterio" function, which uses |
This was always just a heuristic. I think we should support the major readers and conventions including |
So, lines 1133...: if source._file_obj is not None and hasattr(source._file_obj, 'nodata'):
attrs['nodata'] = source._file_obj.nodata could maybe become something like: nodata_keys = ['NODATA', 'nodatavals', 'nodata']
for key in nodata_keys:
if hasattr(source.attrs, key):
attrs['nodata'] = source.attrs[key] ? |
Yes, that's basically what I'm testing now. |
FYI, this is how rioxarray currently does it for any given xarray object:
|
Temporary workaround, if you just want the plot working without caring about nodata vals (maybe they can be set manually?):
|
1 similar comment
Temporary workaround, if you just want the plot working without caring about nodata vals (maybe they can be set manually?):
|
ALL software version info
The full list is available here, the gist is:
xarray
0.17.0datashader
0.12.0Description of expected behavior and the observed behavior
I expect
Canvas().raster
to return aDataArray
object, instead it returns an error.Complete, minimal, self-contained example code that reproduces the issue
Adapted from your documentation
Stack traceback and/or browser JavaScript console output
I think this is related to
#4809
.The text was updated successfully, but these errors were encountered: