related code:
|
if ( |
|
self.metadata |
|
and self.metadata.has_band_dimension() |
|
and isinstance(other, DataCube) |
|
and other.metadata |
|
and other.metadata.has_band_dimension() |
|
): |
|
# Minimal client side metadata merging |
|
merged_metadata = self.metadata |
|
for b in other.metadata.band_dimension.bands: |
|
if b not in merged_metadata.bands: |
|
merged_metadata = merged_metadata.append_band(b) |
|
else: |
|
merged_metadata = None |
|
# Overlapping bands without overlap resolver will give an error in the backend |
Currently if one or both of the cubes have missing band data the resulting metadata is set to None.
Suggested approaches:
- cube1 has bands and cube2 has bands -> current implementation
- cube1 has bands but cube2 has no bands -> take over bands of cube1 (cube2 will be merged with overlap on all bands)
- cube1 has no bands but cube 2 has bands -> See step 2 I think
- both have no bands -> use metadata from first cube
If one of both cubes has none as metadata I think it is still safer to put the result to none as well
In a better scenario the extents of all dimensions are merged but that might be the scope of a separate issue rather than include it in this one.
related code:
openeo-python-client/openeo/rest/datacube.py
Lines 2210 to 2224 in 77c3e87
Currently if one or both of the cubes have missing band data the resulting metadata is set to None.
Suggested approaches:
If one of both cubes has none as metadata I think it is still safer to put the result to none as well
In a better scenario the extents of all dimensions are merged but that might be the scope of a separate issue rather than include it in this one.