Open-EO / openeo-web-editor

An interactive and easy to use web-based editor for the OpenEO API.
https://editor.openeo.org
Apache License 2.0
12 stars 17 forks source link

Don't open metadata when viewing results #265

Closed dthiex closed 2 years ago

dthiex commented 2 years ago

Yes, I'm planning to not open the metadata at all.

Follow up from https://github.com/Open-EO/openeo-web-editor/issues/263#issuecomment-1152096843

m-mohr commented 2 years ago

Yes, if the roles are set, assets with role "metadata" should be excluded from being opened in the viewer. Planned for v0.12

m-mohr commented 2 years ago

Should be available at editor.openeo.org - Could you check whether it works for you, @dthiex ? Make sure that you don't load the editor from cache...

dthiex commented 2 years ago

Could you check whether it works for you, @dthiex ?

Yes, works for me (metadata is not opened automatically upon job finish).

Btw. do I remember correctly that the preview (View results) "only" works for gtiffs? I created some png as output and am stuck (since minutes) with a Loading image screen.

grafik

m-mohr commented 2 years ago

The PNG should also open... mhh... Any errors in the console or so? Because I can't reproduce the issue right now. Ideally, open a new issue.

dthiex commented 2 years ago

Any errors in the console or so?

Yes, sure! Sorry for the not so helpful report...

Below the console error and I also found the underlaying issue. We create "wrong" pngs with more then 3 output bands. Opening such a png in QGIS works and there is also data in the bands >3. I checked the Vito implementation and saw that they "just" export the first 3 bands in such a case. Would that also be for you the expected behaviour?

grafik

m-mohr commented 2 years ago

Yeah, I think PNGs should be Grayscale, RGB or RGBA. Otherwise, most software (especially) browsers can't read it by default.

By the way, the error above doesn't originate from reading the image directly. The error is just from hovering the canvas and trying to read pixel values from it.

dthiex commented 2 years ago

Yeah, I think PNGs should be Grayscale, RGB or RGBA. Otherwise, most software (especially) browsers can't read it by default.

Makes sense (also for jpg). Created an internal issue for this so we improve here.

By the way, the error above doesn't originate from reading the image directly. The error is just from hovering the canvas and trying to read pixel values from it.

Okay, but the image not loading is still due to the mentioned problem.

m-mohr commented 2 years ago

@dthiex I tried to make the image loading more robust. Could you check what happens now at editor.openeo.org (refresh cache pls)? I don't have an image at hand to test what happens with "erroneous" images...

dthiex commented 2 years ago

Could you check what happens now at editor.openeo.org (refresh cache pls)?

Checked and it now doesn't load infinite but I get a "Viewer error" (in the notification panel that disappears after a few seconds again).

Here a 23 band png in case you need it for further testing: 23_band_png

m-mohr commented 2 years ago

Just "Viewer Error" or is there more information available?

Anyway, it is intentional that it gives an error because the Browser can't read the PNG files. So the improvement is that it errors instead of loading forever. @dthiex

Thanks for the image, will have a look.

dthiex commented 2 years ago

Just "Viewer Error" or is there more information available?

I get this notification in the editor

grafik

and this console error

grafik

m-mohr commented 2 years ago

Thanks @dthiex. Okay, I can't get any useful error messages from the browser when loading images. So it should now show a generic "Failed to load the image" error instead of "Viewer Error", right? That seems the best I can do.

dthiex commented 2 years ago

@m-mohr Yes, I am now getting the "Failed to load the image" error message which is I think already a good improvement as it at least gives some idea to where the error is.