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

Geo: implement proper handling of out of bounds geo points #47734

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Oct 8, 2019

This is the first iteration in improving of handling of out of
bounds geopoints with a latitude outside of the -90 - +90 range
and a longitude outside of the -180 - +180 range.

Relates to #43916

This is the first iteration in improving of handling of out of
bounds geopoints with a latitude outside of the -90 - +90 range
and a longitude outside of the -180 - +180 range.

Relates to elastic#43916
@imotov imotov added >bug :Analytics/Geo Indexing, search aggregations of geo points and shapes v8.0.0 v7.5.0 labels Oct 8, 2019
@imotov imotov requested review from talevy and iverase October 8, 2019 15:27
@elasticmachine
Copy link
Collaborator

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

@imotov
Copy link
Contributor Author

imotov commented Oct 8, 2019

@elasticmachine run elasticsearch-ci/2

@@ -160,8 +161,9 @@ public Geometry visit(MultiPolygon multiPolygon) {

@Override
public Geometry visit(Point point) {
//TODO: Just remove altitude for now. We need to add normalization later
return new Point(point.getX(), point.getY());
double[] latlon = new double[]{point.getX(), point.getY()};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a difference between normalizePoint and calling normalizeLon and normalizeLat directly on these values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible to normalize longitude alone. That doesn't work for latitude thought since when you go over the pole, the longitude flips by 180 degrees.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. thanks for clarifying

@imotov imotov merged commit e3adedf into elastic:master Oct 9, 2019
imotov added a commit that referenced this pull request Oct 9, 2019
This is the first iteration in improving of handling of out of
bounds geopoints with a latitude outside of the -90 - +90 range
and a longitude outside of the -180 - +180 range.

Relates to #43916
@imotov imotov deleted the issue-43916-out-of-bounds-points branch May 1, 2020 22:19
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 v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants