Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge_cubes: invalid spatial_extent merging #507

Open
soxofaan opened this issue Sep 11, 2023 · 1 comment
Open

merge_cubes: invalid spatial_extent merging #507

soxofaan opened this issue Sep 11, 2023 · 1 comment

Comments

@soxofaan
Copy link
Member

came up when trying to compile a small poc for cross-backend processing (Open-EO/openeo-aggregator#115):
merge_cubes only seems to consider the spatial extent of the first cube, ignoring the second.

e.g.

cube1 = connection.load_collection(
    "TERRASCOPE_S2_TOC_V2",
    temporal_extent=["2023-08-20", "2023-09-01"],
    spatial_extent={"west": 3.00, "south": 51.00, "east": 3.10, "north": 51.10},
    bands=["B02"],
 )
cube2 = connection.load_collection(
    "TERRASCOPE_S2_TOC_V2",
    temporal_extent=["2023-08-20", "2023-09-01"],
    spatial_extent={"west": 3.05, "south": 51.05, "east": 3.15, "north": 51.15},
    bands=["B02"],
)

cube = cube1.merge_cubes(cube2, overlap_resolver="max")
res = cube.save_result(format="netCDF")
job = res.execute_batch()

Result only covers {"west": 3.00, "south": 51.00, "east": 3.10, "north": 51.10} and does not extend to {..., "east": 3.15, "north": 51.15}

When switching both cubes (cube2.merge_cubes(cube1, overlap_resolver="max"), the result only covers {"west": 3.05, "south": 51.05, "east": 3.15, "north": 51.15}

(not sure yet if this is an issue in openeo-geopyspark-driver or openeo-python-driver, just reporting here for now)

@soxofaan
Copy link
Member Author

soxofaan commented Sep 11, 2023

(FYI, just tried to verify: merging of cubes where only temporal extent is different seems to work properly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant