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

Polygon decomposition fails for simple polygon with an edge on the negative dateline #70913

Closed
iverase opened this issue Mar 26, 2021 · 2 comments
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@iverase
Copy link
Contributor

iverase commented Mar 26, 2021

The following polygon fails indexing:

"POLYGON((-180 62.288856810085,-178.761 63.4792,-180 63.7639,-180 63.763900213475,-180 62.288856810085))"

This is a simple triangle with one edge along the dateline. After going through decomposition, an extra polygon is generated that looks like

POLYGON ((-180.0 62.288856810085, -180.0 63.7639, -180.0 63.763900213475, -180.0 62.288856810085))

That is an invalid polygon and makes indexing fail.

@iverase iverase added >bug :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Mar 26, 2021
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@iverase
Copy link
Contributor Author

iverase commented Mar 29, 2021

Having a closer look into the polygon, the issue here is that t looking at the last three points:

point1 = [-180, 63.7639]
point2 = [-180, 63.763900213475] -> goes just slightly north of point 1
point3 =[-180, 62.288856810085] -> goes south of point 1

Therefore the edge is running over it self and that is not allowed. This is expected, the error message could be improved but that is a much bigger ask, therefore I am closing this issue as it is not really a bug.

@iverase iverase closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

2 participants