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

Add xarray_to_raster function #2072

Merged
merged 5 commits into from
Jul 12, 2024
Merged

Add xarray_to_raster function #2072

merged 5 commits into from
Jul 12, 2024

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Jul 12, 2024

This PR adds an xarray_to_raster function for converting an xarray dataset/array to a raster dataset, such as GeoTIFF.

xarray_to_raster(dataset, filename="image.tif", driver="GTiff", compress="LZW")

@giswqs
Copy link
Member Author

giswqs commented Jul 12, 2024

https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility

It seems numpy 2.0 is causes the tests to fail because some other dependencies do not yet support numpy 2.0. We might need to pin an older version of numpy temporarily

pip install numpy==1.26.4

Copy link

github-actions bot commented Jul 12, 2024

@github-actions github-actions bot temporarily deployed to pull request July 12, 2024 15:07 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 12, 2024 15:16 Inactive
@giswqs giswqs merged commit afaf27c into master Jul 12, 2024
14 checks passed
@giswqs giswqs deleted the xarray branch July 12, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant