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

Fix geo_shapes which intersect dateline #7188

Merged
merged 1 commit into from Aug 12, 2014
Merged

Fix geo_shapes which intersect dateline #7188

merged 1 commit into from Aug 12, 2014

Conversation

colings86
Copy link
Contributor

If a geo_shape had edges which either ran vertically along the dateline or touched the date line but did not cross it they would fail to parse. This is because the code which splits a polygon along the dateline did not take into account the case where the polygon touched but did not cross the dateline. This PR fixes those issues and provides tests for them.

Close #7016

@colings86 colings86 self-assigned this Aug 7, 2014
// Shape shape = builder.close().build();
//
// assertPolygon(shape);
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why all these commented out tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jpountz I forgot to delete them before I made the PR. I realised after creating these tests that they are not relevant as you cannot have a hole share a point with the main polygon, which makes sense since a hole which intersects with the edge of the main polygon isn't actually a hole. I will delete these tests in the next commit

@jpountz
Copy link
Contributor

jpountz commented Aug 11, 2014

LGTM

@jpountz jpountz removed the review label Aug 11, 2014
If a geo_shape had edges which either ran vertically along the dateline or touched the date line but did not cross it they would fail to parse.  This is because the code which splits a polygon along the dateline did not take into account the case where the polygon touched but did not cross the dateline.  This PR fixes those issues and provides tests for them.

Close #7016
@colings86 colings86 merged commit 7c5a954 into elastic:master Aug 12, 2014
@colings86 colings86 deleted the fix/7016 branch August 13, 2014 08:10
@colings86 colings86 assigned colings86 and unassigned colings86 Aug 21, 2014
@clintongormley clintongormley changed the title Geo: fixes geo_shapes which intersect dateline Geo: Fix geo_shapes which intersect dateline Sep 11, 2014
@clintongormley clintongormley added the :Analytics/Geo Indexing, search aggregations of geo points and shapes label Jun 7, 2015
@clintongormley clintongormley changed the title Geo: Fix geo_shapes which intersect dateline Fix geo_shapes which intersect dateline Jun 7, 2015
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 v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geo: Fix comparison of doubles in ShapeBuilder.intersections()
3 participants