You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code seems to compare the current point with the one after next and continue if their comparison value is equal. The reason for doing this is not clear and there are no tests which rely on this code.
The compare method is not limited to return -1, 0 and 1 so the chance of this condition being met seems slim, further adding to the confusion as to what its purpose is.
The text was updated successfully, but these errors were encountered:
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
changed the title
Fix comparison of doubles in ShapeBuilder.intersections()
Geo: Fix comparison of doubles in ShapeBuilder.intersections()
Aug 12, 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
Code in question: https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java#L297-299
This code seems to compare the current point with the one after next and continue if their comparison value is equal. The reason for doing this is not clear and there are no tests which rely on this code.
The compare method is not limited to return -1, 0 and 1 so the chance of this condition being met seems slim, further adding to the confusion as to what its purpose is.
The text was updated successfully, but these errors were encountered: