You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CRS set on Dataset does not persist for DataArrays obtained by selecting data variable #356
The CRS set on a Dataset using .rio.set_crs() does not persist to a DataArray obtained by selecting individual variables from the Dataset. Printing the CRS of the Dataset gives the previously set CRS, but printing the CRS of the DataArray gives None.
Expected Output
The CRS set on a Dataset should also apply to DataArrays of individual variables. Printing DataArray.rio.crs should give the set CRS, EPSG:4326 in this case.
Activity
snowman2 commentedon Jun 14, 2021
We recommend using
rio.write_crsas it persists better.snowman2 commentedon Jun 14, 2021
Related #252
snowman2 commentedon Jun 2, 2022
For those finding this issue, I recommend reading the Getting Started: Introductory Information references for rioxarray. The Coordinare Reference System Management section is relevant for this issue.