Skip to content

Commit

Permalink
Fix nodata value to be info.fillvalue
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Jan 10, 2025
1 parent 5ecf4ff commit dc1fde5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/disp_s1/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ def _get_start_end_cslcs(files):

for info, filename in zip(product_infos[3:], data_files, strict=True):
if filename is not None and Path(filename).exists():
data = io.load_gdal(filename).astype(info.dtype)
data = io.load_gdal(filename, masked=True).filled(info.fillvalue)
data = data.astype(info.dtype)
else:
data = np.full(shape=shape, fill_value=info.fillvalue, dtype=info.dtype)

Expand Down

0 comments on commit dc1fde5

Please sign in to comment.