-
Notifications
You must be signed in to change notification settings - Fork 83
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
MNT: recommend write_crs & deprecate set_crs #793
Conversation
There is some confusion around when to use write_crs versus set_crs. This adds a small note to generally prefer write_crs when CRS persistence is needed. Fixes corteva#743
Thanks! Would you also be willing to add this to the set_crs docstrings? |
I would say never use |
@snowman2 I've pushed two commits that address the |
…o use rio.write_crs() instead
fe3222f
to
cd6ed20
Compare
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
Thanks @dluks 👍 |
Rioxarray 0.16.0 has deprecated the use of `set_crs` in favour of `write_crs`. Xref corteva/rioxarray#793
* Replace rio.set_crs with rio.write_crs in load_tile_map function Rioxarray 0.16.0 has deprecated the use of `set_crs` in favour of `write_crs`. Xref corteva/rioxarray#793 * Add spatial_ref coordinate to load_tile_map's doctest output The `write_crs` command will write an extra grid_mapping attribute to the encoding that shows up in the coordinates.
There is some confusion around when to use
write_crs
versusset_crs
. This adds a small note to generally prefer write_crs when CRS persistence is needed. Fixes #743set_crs
andwrite_crs
#743One remaining nit that I would like to clarify in the documentation as well: when exactly should people use
rio.set_crs()
and notrio.write_crs()
?