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

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

Open
danielFlemstrom opened this issue May 12, 2022 · 6 comments
Labels

Comments

@danielFlemstrom
Copy link

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 ( Open-EO/openeo-odc#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.

@danielFlemstrom danielFlemstrom changed the title When Defining a polygon restriction in load_collection and mask_polygon gives some strange extra data May 12, 2022
@m-mohr
Copy link
Member

m-mohr commented May 12, 2022

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 ( Open-EO/openeo-odc#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
Copy link
Author

danielFlemstrom commented May 31, 2022

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
Copy link
Author

The problem seems to be solved now!

@m-mohr
Copy link
Member

m-mohr commented Oct 7, 2022

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

@danielFlemstrom
Copy link
Author

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
Copy link
Member

m-mohr commented Oct 11, 2022

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.

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

No branches or pull requests

2 participants