Rioxarray da.coords containsspatial_ref with is not a dimension. This makes it go down the wrong code path. By only using da.coords.dims, we can make it go down the same code path as previously.
I also aligned process_crs with the recent changes in hvplot's version of it in https://github.com/holoviz/hvplot/pull/1026. Though I added +init to the string comparison to avoid this warning:
/home/shh/miniconda3/envs/holoviz/lib/python3.11/site-packages/pyproj/crs/crs.py:141: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
in_crs_string = _prepare_from_proj_string(in_crs_string)
At last, I added simple crs detection for a rioxarray and updated param.main.warning to warn as it no longer exits.
These changes make it possible to run the original example like this:
Fixes #644
Rioxarray
da.coords
containsspatial_ref
with is not a dimension. This makes it go down the wrong code path. By only usingda.coords.dims
, we can make it go down the same code path as previously.I also aligned
process_crs
with the recent changes in hvplot's version of it in https://github.com/holoviz/hvplot/pull/1026. Though I added+init
to the string comparison to avoid this warning:At last, I added simple crs detection for a rioxarray and updated
param.main.warning
towarn
as it no longer exits.These changes make it possible to run the original example like this: