Open-EO / openeo-earthengine-driver

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

New strange behaviour on our use case output #49

Closed bgoesswe closed 3 years ago

bgoesswe commented 3 years ago

Lately, the productive GEE backend gives a wrong result on our (unchanged) use case process graph (see attachment). Resulting in a strange image (see attachments).

I also tried it locally with version a1022b4b822dcf7f10c119e8b680251f07c24377 and there it worked.

tuw_use_case1.txt new_wrong_result old_correct_result

bgoesswe commented 3 years ago

Just to add: Our second use case works also fine, processes that only the first one uses:

UC1_spectral.txt

m-mohr commented 3 years ago

Does it still work if you run it locally with the latest commit? And what so the images above show? Before/after?

bgoesswe commented 3 years ago

Yes, I just tried with the latest version in master branch and it worked (resulted in the second image).

Above: after Below: before So the image above should be the image below.

m-mohr commented 3 years ago

So it only affects the deployed version? Interesting. I'll re-install it later...

m-mohr commented 3 years ago

Are you sure you are using the latest commit to master? I'm also getting the wrong results locally.

bgoesswe commented 3 years ago

Oh you are right, I was accidentally using the UC1_spectral process graph, which works in both versions.

bgoesswe commented 3 years ago

It has something to do with the latest commit, with b4f7dfce0e148093de0b2c193a842e3d90343203 it worked.

m-mohr commented 3 years ago

I assumed it had something to do with the &%$&$ projection stuff. What's the original CRS for the data and what's the desired CRS? Maybe we need to default to EPSG 4326 instead of 3857 for PNG/JPEG as we can't easily convert between the two...

bgoesswe commented 3 years ago

That seems to be it, when choosing GTIFF-THUMB as output format it is correct. As far as I know, riginal and desired is both EPSG:4326.

m-mohr commented 3 years ago

Then set the epsg code in save_result to 4326, otherwise you'll get (incorrectly) 3857. Does it work then?

Edit: Yes, works with EPSG code set to 4326.

bgoesswe commented 3 years ago

I just looked a little bit into it and the problem is, that the transformation is different for dimension X and dimension Y, but it is treated at the moment the same:
https://github.com/Open-EO/openeo-earthengine-driver/blob/af42811842cb5f48b26e095244273d31595ff41c/src/processgraph/datacube.js#L314) https://github.com/Open-EO/openeo-earthengine-driver/blob/af42811842cb5f48b26e095244273d31595ff41c/src/processgraph/datacube.js#L315

I did a quick solution in c738a37f6b048d9812d28ae744829a26792cf3bc

m-mohr commented 3 years ago

https://github.com/Open-EO/openeo-earthengine-driver/commit/398509a6053dc042d5a09170c828787c879c1a27 Should fix it also for 3857.