Better handling of "cube math" like `cube1 / cube2`
Maintainer thường phản hồi trong vòng 1 ngày
@soxofaan đang làm issue này rồi.
Từ ngày 10/3/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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:
- Ngôn ngữ chính
- Python
- Star
- 219
- Fork
- 56
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Open-EO/openeo-python-client
-
JupyterLite supportĐang mởauth feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Open-EO/openeo-python-client#953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Stop providing conda packages?Đang mởcollect feedback
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Open-EO/openeo-python-client#952 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Further decouple CubeMetadata from CollectionMetadata, and properly apply spatio-temporal filteringCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Open-EO/openeo-python-client#949 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
asset download: support file:local_path to determine target file nameCó thể đã có người làm @soxofaan đã nhận 47 ngày trước. Đang mởfeature request
Open-EO/openeo-python-client#902 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add split_points functionalityCó thể đã có người làm @HansVRP đã nhận 2 ngày trước. Đang mởjob manager
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Open-EO/openeo-python-client#899 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Open-EO/openeo-python-client
Issue tương tự
-
documentation pkg: sphinx-needs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
useblocks/sphinx-needs#2255 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
home-assistant/core#186538 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
btclib-org/btclib-secp256k1#1181 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pyrite-wiki/pyrite#917 ·
Maintainer thường phản hồi trong vòng 1 ngày