How would we pass arguments to the apply function? For instance if we want to change the
count to 1?
import geowombat as gw
# Function with one argument
def user_func(block, n):
return block * n
with gw.open('input.tif') as ds:
# Functions are given as 'apply'
ds.attrs['apply'] = user_func
# Function arguments (n) are given as 'apply_args'
ds.attrs['apply_args'] = [10.0]
ds.gw.save(
'output.tif',
num_workers=2,
overwrite=True,
compress='lzw'
)
How would we pass arguments to the apply function? For instance if we want to change the count to 1?