Skip to content
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

Document difference between set_crs and write_crs #743

Open
ttencate opened this issue Feb 12, 2024 · 4 comments
Open

Document difference between set_crs and write_crs #743

ttencate opened this issue Feb 12, 2024 · 4 comments
Labels
bug Something isn't working documentation Documentation related issue good first issue Good for newcomers

Comments

@ttencate
Copy link

set_crs:

Set the CRS value for the Dataset/DataArray without modifying the dataset/data array.

write_crs:

Write the CRS to the dataset in a CF compliant manner.

The input_crs and inplace arguments are the same; the only difference in signature is that write_crs takes an optional grid_mapping_name.

In short, I'm confused 😉

Maybe consider write_coordinate_system in this issue as well.

@ttencate ttencate added the bug Something isn't working label Feb 12, 2024
@snowman2
Copy link
Member

Looks like you found this: https://corteva.github.io/rioxarray/stable/getting_started/crs_management.html

set_crs is not recommended to use because the CRS doesn't persist.

@ttencate
Copy link
Author

Good to know, thanks. Would be great if the docs noted this, and also explained what set_crs would be used for.

@snowman2
Copy link
Member

Thank you for your suggestions! Contributions are welcome and appreciated.

@snowman2 snowman2 added the documentation Documentation related issue label Feb 12, 2024
@snowman2
Copy link
Member

Related #356

@snowman2 snowman2 added the good first issue Good for newcomers label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Documentation related issue good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants