Uh oh!
There was an error while loading. Please reload this page.
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. Fixescorteva#743
snowman2
commented
Jul 3, 2024
Thanks! Would you also be willing to add this to the set_crs docstrings? |
snowman2
commented
Jul 3, 2024
I would say never use |
dluks
commented
Jul 3, 2024
@snowman2 I've pushed two commits that address the |
…o use rio.write_crs() instead
fe3222f to
cd6ed20CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
snowman2
commented
Jul 8, 2024
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_crsversusset_crs. This adds a small note to generally prefer write_crs when CRS persistence is needed. Fixes#743set_crsandwrite_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()?