-
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 GeometryTree support for point/multipoint #43432
Conversation
Pinging @elastic/es-analytics-geo |
run elasticsearch-ci/2 |
This commit adds support for MultiPoint and Point shapes to be stored in GeometryTree. To represent the collection of points, a KDbush is used, which is a sorted array sorted recursively by alternating dimensions x/y. This work is inspired by https://github.com/mourner/kdbush The purpose of this reader is to check whether any subset of the points in the kd-tree are contained within the bounding-box query.
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.
I added a few suggestions, but otherwise looks good.
server/src/main/java/org/elasticsearch/common/geo/Point2DWriter.java
Outdated
Show resolved
Hide resolved
libs/geo/src/main/java/org/elasticsearch/geo/geometry/MultiPoint.java
Outdated
Show resolved
Hide resolved
libs/geo/src/main/java/org/elasticsearch/geo/geometry/GeometryCollection.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/geo/GeometryTreeReader.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/geo/GeometryTreeWriter.java
Outdated
Show resolved
Hide resolved
thanks @imotov, I've tried to respond to all your good comments! |
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.
Left a couple of minor comments. Otherwise LGTM.
server/src/main/java/org/elasticsearch/common/geo/Point2DWriter.java
Outdated
Show resolved
Hide resolved
thanks Igor! |
* Add GeometryTree support for point/multipoint This commit adds support for MultiPoint and Point shapes to be stored in GeometryTree. To represent the collection of points, a KDbush is used, which is a sorted array sorted recursively by alternating dimensions x/y. This work is inspired by https://github.com/mourner/kdbush The purpose of this reader is to check whether any subset of the points in the kd-tree are contained within the bounding-box query. * unify reader interface and cleanup multipoint usage * respond to review
This commit adds support for MultiPoint and Point
shapes to be stored in GeometryTree.
To represent the collection of points, a KDbush is used, which is
a sorted array sorted recursively by alternating dimensions x/y.
This work is inspired by https://github.com/mourner/kdbush
The purpose of this reader is to check whether any subset of the
points in the kd-tree are contained within the bounding-box query.