Skip to content

Commit

Permalink
add resolution and crs in load_stac
Browse files Browse the repository at this point in the history
  • Loading branch information
clausmichele committed Oct 7, 2024
1 parent 400927f commit a1b7689
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions openeo_processes_dask/process_implementations/cubes/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def load_stac(
temporal_extent: Optional[TemporalInterval] = None,
bands: Optional[list[str]] = None,
properties: Optional[dict] = None,
resolution: Optional[float] = None,
projection: Optional[Union[int,str]] = None,
resampling: Optional[str] = None,
) -> RasterCube:
stac_type = _validate_stac(url)

Expand Down Expand Up @@ -232,6 +235,13 @@ def load_stac(
nodata_set = {asset_scale_offset[k]["nodata"] for k in asset_scale_offset}
dtype_set = {asset_scale_offset[k]["data_type"] for k in asset_scale_offset}
kwargs = {}
if resolution is not None:
kwargs["resolution"] = resolution
if projection is not None:
kwargs["crs"] = projection
if resampling is not None:
kwargs["resampling"] = resampling

if len(nodata_set) == 1 and list(nodata_set)[0] == None:
apply_nodata = False
if apply_nodata:
Expand Down

0 comments on commit a1b7689

Please sign in to comment.