-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
add EdgeTree support for lines/multilines #43949
Conversation
The main change here is that edge-trees originally checked whether the queried extent could be contained within its shape. Since line-strings have no inner boundaries, this check is not useful, the line crosses check + extent-check-bounds is sufficient.
Pinging @elastic/es-analytics-geo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. The name closed
confused me a bit, since we are using it in the context of shapes for a slightly different purpose. I think in this context we want to indicate dimension. closed == true
means we are dealing with area or 2 dimensional shapes and closed == false
means that we are dealing with 1 dimensional shapes.
server/src/main/java/org/elasticsearch/common/geo/EdgeTreeReader.java
Outdated
Show resolved
Hide resolved
better define the difference between edge-trees representing polygons vs. line-strings. Polygons have non-zero areas. Also added tests for shapeType and closed line-strings.
test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
The main change here is that edge-trees originally checked whether the queried extent could be contained within its shape. Since line-strings have no inner boundaries, this check is not useful, the line crosses check + extent-check-bounds is sufficient.
The main change here is that edge-trees originally
checked whether the queried extent could be contained
within its shape. Since line-strings have no inner boundaries,
this check is not useful, the line crosses check + extent-check-bounds
is sufficient.