mirror of
https://github.com/rasterio/rasterio.git
synced 2025-12-08 17:36:12 +00:00
Get fallback nodata value from dest.
This commit is contained in:
parent
9cd3cc049f
commit
e08fb78754
@ -39,7 +39,7 @@ def merge(ctx, files, driver):
|
||||
dest = np.zeros((first.count,) + first.shape,
|
||||
dtype=first.dtypes[0])
|
||||
|
||||
nodataval = 0.0
|
||||
nodataval = next(dest.flat)
|
||||
if os.path.exists(output):
|
||||
dst = rasterio.open(output, 'r+')
|
||||
nodataval = dst.nodatavals[0] or nodataval
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user