html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2042#issuecomment-510693104,https://api.github.com/repos/pydata/xarray/issues/2042,510693104,MDEyOklzc3VlQ29tbWVudDUxMDY5MzEwNA==,8699967,2019-07-11T23:46:38Z,2019-07-11T23:46:38Z,CONTRIBUTOR,"A new project called [rioxarray](http://github.com/corteva/rioxarray) has a `to_raster` method with the default driver of `GTiff`.
You can use it like so:
```
import rioxarray
import xarray
xds = xarray.open_rasterio(""myfile.tif"")
wgs84_xds = xds.rio.reproject(""EPSG:4326"")
wgs84_xds.rio.to_raster(""myfile_wgs84.tif"")
```
It currently only supports 2d/3d `DataArray`s. So, you would have to iterate over your variables to export each one to a raster if you have a `Dataset`.","{""total_count"": 8, ""+1"": 7, ""-1"": 0, ""laugh"": 1, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,312203596
https://github.com/pydata/xarray/issues/2042#issuecomment-456410755,https://api.github.com/repos/pydata/xarray/issues/2042,456410755,MDEyOklzc3VlQ29tbWVudDQ1NjQxMDc1NQ==,1828519,2019-01-22T14:05:33Z,2019-01-22T14:05:33Z,CONTRIBUTOR,@guillaumeeb Not that I know of but I'm not completely in the loop with xarray. There is the geoxarray project that I started (https://github.com/geoxarray/geoxarray) but really haven't had any time to work on it. Otherwise you could look at the [satpy library](https://satpy.readthedocs.io/en/latest/) or its dependency library [trollimage](https://trollimage.readthedocs.io/en/latest/xrimage.html) which uses rasterio but it assumes some things about how data is structured including an `'area'` in `.attrs` from [pyresample](https://pyresample.readthedocs.io/en/latest/). Sorry I don't have a better idea.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,312203596
https://github.com/pydata/xarray/issues/2042#issuecomment-406696890,https://api.github.com/repos/pydata/xarray/issues/2042,406696890,MDEyOklzc3VlQ29tbWVudDQwNjY5Njg5MA==,1828519,2018-07-20T18:57:38Z,2018-07-20T18:58:10Z,CONTRIBUTOR,"I'd like to add to this discussion the issue I brought up here #2288. It is something that could/should probably result in a new xarray add-on package for doing these type of operations. For example, I work on the pyresample and satpy projects. Pyresample uses its own ""AreaDefinition"" objects to define the geolocation/projection information. SatPy uses these AreaDefinitions by setting `DataArray.attrs['area']` and using then when necessary. This includes the ability to write geotiffs using rasterio and a custom array-like class for writing dask chunks to the geotiff between separate threads (does not work multiprocess, yet).
Edit: by ""add-on"" I mean something like ""geoxarray"" where it is an optional dependency for a user that depends completely on xarray.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,312203596