Skip to content

Commit 5f27db8

Browse files
committed
Issue #484: add "Sentinel1" band mapping support to "Awesome Spectral Indices" wrapper
1 parent 78e8e93 commit 5f27db8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
- Add `DataCube.reduce_spatial()`
1414
- Added option (enabled by default) to automatically validate a process graph before execution. Validation issues just trigger warnings for now. ([#404](https://github.com/Open-EO/openeo-python-client/issues/404))
15+
- Added "Sentinel1" band mapping support to "Awesome Spectral Indices" wrapper ([#484](https://github.com/Open-EO/openeo-python-client/issues/484))
1516

1617
### Changed
1718

openeo/extra/spectral_indices/spectral_indices.py

+8
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
"B11": "S1",
6262
"B12": "S2",
6363
}
64+
BAND_MAPPING_SENTINEL1 = {
65+
"HH": "HH",
66+
"HV": "HV",
67+
"VH": "VH",
68+
"VV": "VV",
69+
}
6470

6571

6672
def _get_expression_map(cube: DataCube, x: ProcessBuilder) -> Dict[str, ProcessBuilder]:
@@ -78,6 +84,8 @@ def _get_expression_map(cube: DataCube, x: ProcessBuilder) -> Dict[str, ProcessB
7884
band_mapping = BAND_MAPPING_PROBAV
7985
elif "TERRASCOPE_S2" in collection_id or "SENTINEL2" in collection_id:
8086
band_mapping = BAND_MAPPING_SENTINEL2
87+
elif "SENTINEL1" in collection_id:
88+
band_mapping = BAND_MAPPING_SENTINEL1
8189
else:
8290
raise ValueError(f"Could not detect supported satellite platform from {collection_id!r} for index computation")
8391

0 commit comments

Comments
 (0)