Preserve metadata when merging cubes without bands#912
Open
Silvren wants to merge 1 commit into
Open
Conversation
Silvren
force-pushed
the
agent/merge-cubes-band-metadata
branch
from
July 13, 2026 14:14
1bad7f5 to
6afdced
Compare
soxofaan
reviewed
Jul 17, 2026
|
|
||
| - Better error message when passing a bounding box with field typos in `Connection.load_collection()` and alike ([#910](https://github.com/Open-EO/openeo-python-client/issues/910)) | ||
|
|
||
| - Preserve available band metadata when merging data cubes if one cube has no band dimension. ([#783](https://github.com/Open-EO/openeo-python-client/issues/783)) |
Member
There was a problem hiding this comment.
changelog has been bumped in meantime, this has to be moved
| if b not in merged_metadata.bands: | ||
| merged_metadata = merged_metadata.append_band(b) | ||
| elif other.metadata.has_band_dimension(): | ||
| merged_metadata = other.metadata |
Member
There was a problem hiding this comment.
It's not ideal to use the other.metadata in full here, just to copy the band metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
merge_cubesreceives cubes without band dimensionsTesting
python -m pytest tests/rest/datacube/test_datacube100.py -q(347 passed, 2 skipped)pre-commit run --files CHANGELOG.md openeo/rest/datacube.py tests/rest/datacube/test_datacube100.pyFixes #783