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

Conversation

Projects
None yet
3 participants
@colings86
Copy link
Member

colings86 commented Aug 7, 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 added the review label Aug 7, 2014

@colings86 colings86 self-assigned this Aug 7, 2014

@jpountz

View changes

src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java Outdated
// Shape shape = builder.close().build();
//
// assertPolygon(shape);
// }

This comment has been minimized.

Copy link
@jpountz

jpountz Aug 11, 2014

Contributor

Why all these commented out tests?

This comment has been minimized.

Copy link
@colings86

colings86 Aug 11, 2014

Author Member

@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 jpountz removed the review label Aug 11, 2014

@colings86 colings86 added the review label Aug 11, 2014

@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Aug 11, 2014

LGTM

@jpountz jpountz removed the review label Aug 11, 2014

Geo: fixes geo_shapes which intersect dateline
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 colings86:fix/7016 branch Aug 13, 2014

@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 >bug label Sep 11, 2014

@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
You can’t perform that action at this time.