Closed mmann1123 closed 3 months ago
Self q&a here closing
Need to set bounds and bigtif. Maybe bigtif or gdal cache are limited with save
?
Suggested solution
from geowombat.backends.rasterio_ import get_file_bounds
bounds = get_file_bounds( [files], return_bounds=True, )
with gw.config.update(bigtiff="yes", ref_bounds = bounds):
with gw.open(bgrn, stack_dim="band") as src:
src = src.astype("float32")
src.gw.save(
filename=f"../stacks/S2_SR_{quarter}_{grid}.tif",
nodata=nan,
overwrite=True,
num_workers=12,
compress="lzw",
)
Note to self. Bigtif can be triggered using config update
So write with: