Skip to content

Commit

Permalink
buxfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
konstntokas committed Dec 4, 2024
1 parent e8b86b2 commit c67224c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xcube_stac/stac_extension/raster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pdb

import numpy as np
import pystac
import xarray as xr
Expand Down Expand Up @@ -63,6 +65,9 @@ def apply_offset_scaling_odc_stac(ds: xr.Dataset, grouped_items: dict) -> xr.Dat
nodata_val[i] = raster_bands[0].get("nodata")
scale[i] = raster_bands[0].get("scale", 1)
offset[i] = raster_bands[0].get("offset", 0)
import pdb

pdb.set_trace()
assert np.unique(nodata_val).size == 1
ds[asset_name] = ds[asset_name].where(ds[asset_name] != nodata_val[0])
ds[asset_name] *= scale[:, np.newaxis, np.newaxis]
Expand Down

0 comments on commit c67224c

Please sign in to comment.