Open-EO / openeo-earthengine-driver

openEO back-end driver for Google Earth Engine.
Apache License 2.0
21 stars 7 forks source link

raster bands computation from different images/datacubes #48

Closed pacomoral closed 3 years ago

pacomoral commented 4 years ago

We are aiming to do some computation between bands from different files (e.g. IM1_B1+IM1_B2+IM2_B1+IM2_B2). The way to do that was trying the merge_cubes command for having all bands in the same cube, but an error comes up (this.getTitle is not a function). Looks like there is an overlap_resolver (merge_cubes) issue in GEE, (thanks for the info, Matthias). And the main point is how to compute data from different sources, either with merge_cubes or another command/approach, any suggestions?

Regards Paco

openEO_2dc_problem.txt

m-mohr commented 3 years ago

but an error comes up (this.getTitle is not a function).

This is a Web Editor error that has been fixed. The actual error was from GEE and stated that the overlap resolver is missing. While looking at the code, it seems overlap resolver is not supported (there's a ToDo in code, but the parameter hasn't been removed from the process spec)

And the main point is how to compute data from different sources, either with merge_cubes or another command/approach, any suggestions?

@bgoesswe Did you implement that? Could you finish the implementation? Could be related to #47, too?

openEO_2dc_problem.txt

@pacomoral One thing that confuses me here is that the load_collection arguments are exactly the same. The reduce_dimensions, too. So you are merging two equal data cubes, which doesn't seem very meaningful. Is there something I'm missing or is the process not correct? After clarifying this, we may be able to provide an alternative solution, too.

bgoesswe commented 3 years ago

I am now implementing the overlap resolver, but one additional note on this process graph:

If you want to use the merge_cubes process and the input datacubes overlap, you have to specify the overlap resolver attribute in the merge_cubes process. Otherwise, the backend does not know what to do with the overlapping data. (see https://openeo.org/documentation/1.0/processes.html#merge_cubes) So, in this case, the error "OverlapResolverMissing" is actually a valid response from the backend (even though it would not work atm if you fix that part^^)

pacomoral commented 3 years ago

You are right, @m-mohr, data used in the model doesn't seem very meaningful, it's just a toy problem in which data was selected trying not to cause incompatibility problems. I attached a new model with more realistic data. In this new model I used rename_labels to avoid overlap problems since input datacubes have the same data definition (and different dates); @bgoesswe, should it work?. In this point I'm getting the error 'Computation failed The number of labels in the parameters source and target don't match.' I'm not sure if the error comes from a detail (some parameter) or this approach is not like OpenEO is structured.

By reading your answers, I understand that the way for computing bands from different images is via 'merge_cubes', so I'll focus on this approach. I'm just landing on the OpenEO planet, advise welcome!

Thanks! test_S1.txt

bgoesswe commented 3 years ago

No I am not finished yet, I will comment on this issue when it should work.

pacomoral commented 3 years ago

Just to update, last error I got has been solved!, it was a matter of parameters missing in the rename_labels command (file attached). Good news, now I'm able to compute from different cubes taking precautions of controlling label band names for avoiding overlaps in the merge_cubes. @m-mohr, @bgoesswe Thanks for your support! test_S1_2dc_process.txt

m-mohr commented 3 years ago

Then this issue is solved, right?