XArrayAndRasterio icon indicating copy to clipboard operation
XArrayAndRasterio copied to clipboard

Experimental code for loading/saving XArray DataArrays to Geographic Rasters using rasterio

Results 2 XArrayAndRasterio issues
Sort by recently updated
recently updated
newest added

This is the code used to convert xarray to tif. merged = xr.open_dataarray('/home/MERGED_NO2(1996-2021).nc') a = merged[:,:,0] bb = a.rename({'lon':'x', 'lat':'y'}) bb = bb.rio.write_crs("epsg:4326", inplace=True) bb.rio.to_raster('/home/test.tif') In arcmap, it is: Why...

It looks like this only supports a single band for now [1]. This could pretty easily be extended to 3 dims (most common for geoscience cases) by assuming a 3D...