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

Geometry error message improvement #672

Open
jhnwllr opened this issue Aug 28, 2023 · 1 comment
Open

Geometry error message improvement #672

jhnwllr opened this issue Aug 28, 2023 · 1 comment

Comments

@jhnwllr
Copy link
Collaborator

jhnwllr commented Aug 28, 2023

(from GBIF helpdesk)

Just quickly, as it is the weekend, I think you need to check your
geometry. I see

MULTIPOLYGON (((3.9824 51.8131, 4.9905 51.8131, 4.9905 52.5711,
3.9824 52.5711, 3.9824 51.8131)), ((4.2092 51.8228, 5.1048 51.8228,
5.1048 52.4541, 4.2092 52.4541, 4.2092 51.8228)))

which gives an error, as it intersects. You can try drawing it on
https://arthur-e.github.io/Wicket/ for example.

I'll check with the developer for RGBIF whether we can improve the error
messages for this.

@MattBlissett
Copy link
Collaborator

Note the API does give an error message:

curl -i --user ********:******** -H "Content-Type: application/json" -X POST --data '{"format":"SIMPLE_CSV","predicate":{"type":"within","geometry":"MULTIPOLYGON (((3.9824 51.8131, 4.9905 51.8131, 4.9905 52.5711, 3.9824 52.5711, 3.9824 51.8131)), ((4.2092 51.8228, 5.1048 51.8228, 5.1048 52.4541, 4.2092 52.4541, 4.2092 51.8228)))"}}' 'https://api.gbif-uat.org/v1/occurrence/download/request'
HTTP/2 400
content-type: text/plain
...

Invalid geometry: Self-intersection at or near point (4.9905, 52.4541, NaN)

The content type is text/plain which matches the response type, but I'm willing to change the response to JSON if that makes things easier, i.e.

HTTP/2 400
content-type: application/json
...

"Invalid geometry: Self-intersection at or near point (4.9905, 52.4541, NaN)"

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

No branches or pull requests

2 participants