Better handling of "cube math" like `cube1 / cube2`
维护者通常 1 天内回复
@soxofaan 已经在做这个了。
开始于 2025年3月10日。
评估
这个 Issue 还没有评估数据。
描述
The python client has since long a compelling "band math" feature, e.g.:
red = s2cube.band("B04")
nir = s2cube.band("B08")
ndvi = (nir - red) / (nir + red)
which is translated to a reduce_dimension along band dimension with the appropriate reducer.
User however also naively try to use these kind of math expressions without using the .band() method, e.g.:
cube3 = cube1 / cube2
Which kind of works: it will produce a merge_cubes operation with an overlap resolver set to "divide" in this case.
As discussed in https://github.com/Open-EO/openeo-processes/issues/280 this is unfortunately a dangerous approach because it will give unexpected results in situations without 100% overlap
Alternative approach: use merge_cubes without overlap resolver to "stack" bands of both cubes in a single cube and do apply_dimension to combine the bands as desired to a new cube. This would involve quite a bit more steps, but will result in more correct calculation:
- before merge: rename bands to ensure 0 overlap. Also: if there are no bands yet: make sure there are
merge_cubesexplicitly without overlap resolver to make sure bands are stacked- use
apply_dimension(or maybereduce_dimensionin some cases) to implement the desired operation - remame bands again to what the user expects
Quite vital to get this working is that band name handling is correct and in line with how it works backend-side. This might be a bit challenging with load_stac use cases where band detection can be a bit fuzzy.
other related issues:
- 主要语言
- Python
- 星标
- 219
- 派生
- 56
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Open-EO/openeo-python-client 的其他 Issue
-
auth feature request
难度 5/5 一周以上 新手友好度 25/100
Open-EO/openeo-python-client#953 ·
维护者通常 1 天内回复
-
collect feedback
难度 5/5 一周以上 新手友好度 35/100
Open-EO/openeo-python-client#952 · 7 条评论 ·
维护者通常 1 天内回复
-
Further decouple CubeMetadata from CollectionMetadata, and properly apply spatio-temporal filtering可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
Open-EO/openeo-python-client#949 · 3 条评论 ·
维护者通常 1 天内回复
-
asset download: support file:local_path to determine target file name可能已有人在做 @soxofaan 于 46 天前认领。 未关闭feature request
Open-EO/openeo-python-client#902 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add split_points functionality可能已有人在做 @HansVRP 于 1 天前认领。 未关闭job manager
难度 4/5 3-5 天 新手友好度 35/100
Open-EO/openeo-python-client#899 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 Open-EO/openeo-python-client 的全部 Issue
相似的 Issue
-
effort: low prio: low ready
难度 2/5 1-3 小时 新手友好度 82/100
digitalfabrik/integreat-cms#4616 ·
维护者通常 5 天内回复
-
bug difficulty:2 good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
MakazhanAlpamys/Soup#1865 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
FinanceFlash/unvibecode#233 ·
维护者通常 1 天内回复
-
area: agents area: docs good first issue
难度 2/5 1-3 小时 新手友好度 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exempt可能已有人在做 @adityasinha-ghub 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
pylint-dev/pylint#11656 ·
维护者通常 1 天内回复