MNT: recommend write_crs & deprecate set_crs#793
Merged
snowman2 merged 9 commits intocorteva:masterfrom Jul 8, 2024
Merged
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
Member
|
Thanks! Would you also be willing to add this to the set_crs docstrings? |
Member
I would say never use |
Contributor
Author
|
@snowman2 I've pushed two commits that address the |
…o use rio.write_crs() instead
fe3222f to
cd6ed20
Compare
snowman2
reviewed
Jul 5, 2024
snowman2
reviewed
Jul 5, 2024
snowman2
reviewed
Jul 5, 2024
snowman2
reviewed
Jul 5, 2024
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>
snowman2
reviewed
Jul 8, 2024
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
Member
|
Thanks @dluks 👍 |
weiji14
added a commit
to GenericMappingTools/pygmt
that referenced
this pull request
Jul 9, 2024
Rioxarray 0.16.0 has deprecated the use of `set_crs` in favour of `write_crs`. Xref corteva/rioxarray#793
Merged
7 tasks
weiji14
added a commit
to GenericMappingTools/pygmt
that referenced
this pull request
Jul 9, 2024
* 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()?