-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RasterioDeprecationWarning #3964
Conversation
When a `vrt` is opened, a deprecation warning will be shown: ```python /home/taher/.local/apps/miniconda/envs/hydrodata/lib/python3.8/site-packages/xarray/backends/rasterio_.py:241: RasterioDeprecationWarning: dst_nodata will be removed in 1.1, use nodata riods = WarpedVRT(riods, **vrt_params) /home/taher/.local/apps/miniconda/envs/hydrodata/lib/python3.8/site-packages/xarray/backends/rasterio_.py:35: RasterioDeprecationWarning: dst_nodata will be removed in 1.1, use nodata riods = WarpedVRT(riods, **vrt_params) /home/taher/.local/apps/miniconda/envs/hydrodata/lib/python3.8/site-packages/xarray/backends/rasterio_.py:122: RasterioDeprecationWarning: dst_nodata will be removed in 1.1, use nodata riods = WarpedVRT(riods, **self.vrt_params) ``` This change can be confirmed in `rasterio`'s documentation where `dst_nodata` is replaced with nodata. https://rasterio.readthedocs.io/en/latest/api/rasterio.vrt.html
Thanks @cheginit ! I know it's a small change, but would you be up for adding a whatsnew entry and giving yourself credit? |
Sure! |
Cheers @cheginit ! |
Thanks! |
* upstream/master: (39 commits) Pint support for DataArray (pydata#3643) Apply blackdoc to the documentation (pydata#4012) ensure Variable._repr_html_ works (pydata#3973) Fix handling of abbreviated units like msec (pydata#3998) full_like: error on non-scalar fill_value (pydata#3979) Fix some code quality and bug-risk issues (pydata#3999) DOC: add pandas.DataFrame.to_xarray (pydata#3994) Better chunking error messages for zarr backend (pydata#3983) Silence sphinx warnings (pydata#3990) Fix distributed tests on upstream-dev (pydata#3989) Add multi-dimensional extrapolation example and mention different behavior of kwargs in interp (pydata#3956) keep attrs in interpolate_na (pydata#3970) actually use preformatted text in the details summary (pydata#3978) facetgrid: Ensure that colormap params are only determined once. (pydata#3915) RasterioDeprecationWarning (pydata#3964) Empty line missing for DataArray.assign_coords doc (pydata#3963) New coords to existing dim (doc) (pydata#3958) implement a more threadsafe call to colorbar (pydata#3944) Fix wrong order of coordinate converted from pd.series with MultiIndex (pydata#3953) Updated list of core developers (pydata#3943) ...
Would you like to add this update to rioxarray as well? If not, mind if I port it over? |
@snowman2 Sure would be happy to. |
@snowman2 I went through the code and didn't find any |
@cheginit, thanks for being willing. The part to modify is here: https://github.com/corteva/rioxarray/blob/6587726a019f46ec68ca94d6cea866abea956a2a/rioxarray/_io.py#L657 |
Following the discussion on [xarray](pydata/xarray#3964), this PR addresses the RasterioDeprecationWarning.
When a
vrt
is opened, a deprecation warning will be shown:This change can be confirmed in
rasterio
's documentation wheredst_nodata
is replaced with nodata.https://rasterio.readthedocs.io/en/latest/api/rasterio.vrt.html