Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Weidenholzer committed Aug 11, 2023
1 parent 999ec92 commit a3d3559
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions openeo_processes_dask/process_implementations/cubes/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def merge_cubes(
cube1 = cube1.to_dataset(cube1.openeo.band_dims[0])
cube2 = cube2.to_dataset(cube2.openeo.band_dims[0])

# compat="override" to deal with potentially conflicting coords
# see https://github.com/Open-EO/openeo-processes-dask/pull/148 for context
merged_cube = xr.combine_by_coords(
[cube1, cube2], combine_attrs="drop_conflicts", compat="override"
)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ def test_merge_cubes_type_4(

@pytest.mark.parametrize("size", [(6, 5, 4, 1)])
@pytest.mark.parametrize("dtype", [np.float64])
def test_merge_cubes_type_5(
def test_conflicting_coords(
temporal_interval, bounding_box, random_raster_data, process_registry
):
# See https://github.com/Open-EO/openeo-processes-dask/pull/148 for why is is necessary
# This is basically broadcasting the smaller datacube and then applying the overlap resolver.
cube_1 = create_fake_rastercube(
data=random_raster_data,
Expand Down

0 comments on commit a3d3559

Please sign in to comment.