Use Xarray to Save Dataarray as geoTiff, Without Using Ram Memory
I Need to Modify a Very Large geoTif File (Over 200Gb), However When I Save It My Code Crashes as It Loads the File in Memory. the Code Looks Like This. Import...
I need to modify a very large geoTif file (over 200GB), however when I save it my code crashes as it loads the file in memory. The code looks like this.
import xarray as xr
# open the file
ds = xr.open_rasterio('file.tif')
# modify here
.....
# this part uses too much memory and gives me the problem
ds.rio.to_raster('output.tif')
Is there any way to save the file as a tif, without loading it all in memory?