-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Update GeoPolygonFilter to handle polygons crossing the dateline #9339
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
Conversation
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.
Won't this be true for any GeoPoint, so you can never reach the block casting to GeoPoint?
|
@nknize I left some comments. |
|
@rjernst please could you give another review |
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 still feel like we should make this function name "correct" and maybe call it "computePolyBottomLeft"?
|
LGTM. I also think having dedicated unit tests for the utility methods in |
4111a93 to
49b323f
Compare
PR elastic#8672 addresses ambiguous polygons - those that either cross the dateline or span the map - by complying with the OGC standard right-hand rule. Since ```GeoPolygonFilter``` is self contained logic, the fix in elastic#8672 did not address the issue for the ```GeoPolygonFilter```. This was identified in issue elastic#5968 This fixes the ambiguous polygon issue in ```GeoPolygonFilter``` by moving the dateline crossing code from ```ShapeBuilder``` to ```GeoUtils``` and reusing the logic inside the ```pointInPolygon``` method. Unit tests are added to ensure support for coordinates specified in either standard lat/lon or great-circle coordinate systems. closes elastic#5968 closes elastic#9304
5155a51 to
06667c6
Compare
PR #8672 addresses ambiguous polygons - those that either cross the dateline or span the map - by complying with the OGC standard right-hand rule. Since
GeoPolygonFilteris self contained logic, the fix in #8672 did not address the issue for theGeoPolygonFilter. This was identified in issue #5968This fixes the ambiguous polygon issue in
GeoPolygonFilterby moving the dateline crossing code fromShapeBuildertoGeoUtilsand reusing the logic inside thepointInPolygonmethod. Unit tests are added to ensure support for coordinates specified in either standard lat/lon or great-circle coordinate systems.closes #5968
closes #9304