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

Defining a polygon restriction in load_collection and mask_polygon gives some strange extra data #252

Open danielFlemstrom opened 2 years ago

danielFlemstrom commented 2 years ago

When defining a geojson polygon in the web editor, like this:

image

we got some extra data at the end that looks a bit suspicious (the "correct" polygon removed) image

As for now, the generated code just omits the extent ( https://github.com/Open-EO/openeo-odc/issues/3) but it would be nice to know if the web-editor is producing the correct graph or not since the polygon handling is important to us.

Depending on how you have decided, maybe remove the option from load collection and let mask_polygon do the cutting altogether. Unfortunately, when i tested to use the mask_polygon process, that process got the same strange structure.

m-mohr commented 2 years ago

Hmm, I can't reproduce this right now. The second Feature indeed looks weird, because it is simply a point basically. But the OpenLayers GeoJSON Editor is sometimes a bit weird, indeed, so I'm not surprised.

As for now, the generated code just omits the extent ( https://github.com/Open-EO/openeo-odc/issues/3) but it would be nice to know if the web-editor is producing the correct graph or not since the polygon handling is important to us.

I'd assume the first one is correct and the second one should not be there. Can you reproduce this reliably?

Depending on how you have decided, maybe remove the option from load collection and let mask_polygon do the cutting altogether. Unfortunately, when i tested to use the mask_polygon process, that process got the same strange structure.

The options will not be removed from load_collection. Ultimately, the code that produces the GeoJSON is anyway the same so mask_polygon should struggle from the same behavior in the Web Editor. I'm not sure about the ODC issues, I'm not involved there.

danielFlemstrom commented 2 years ago

yes, I tried again and get the same behavior, the following geojson: image

Yields the following extra code (which is identical to the first/last point in the polygon, i tested several times) : ..... [ [ 16.516218310221195, 59.584669076046936], [ 16.516218310221195, 59.584669076046936], [16.516218310221195, 59.584669076046936], [16.516218310221195, 59.584669076046936] ] ....

danielFlemstrom commented 1 year ago

The problem seems to be solved now!

m-mohr commented 1 year ago

Thanks for following up, seemed to be an upstream issue then.

danielFlemstrom commented 1 year ago

Sorry just discovered that using the :latest docker container instead of the web deployed openeo-web-editor, the problem is still there. If this is due to an outdated :latest, you can close this issue again. I cannot test the online web-editor right now, so i cannot confirm that the problem exists there as well.

m-mohr commented 1 year ago

Not sure, it looks up to date, but I'm neither maintaining nor using the Docker image.

Also, this looks like an upstream issue in ol or ol-ext. So not sure I can do a lot about it.