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

Implement all binary operations that depend only on point-in-polygon #834

Merged
merged 27 commits into from
Dec 15, 2022

Conversation

thomcom
Copy link
Contributor

@thomcom thomcom commented Dec 1, 2022

Closes #722
Closes #835

Description

This PR begins the refactoring of binary operations code to support every binary operation and combination of inputs. A new test file is created, tests/binops/test_pip_only_binpreds.py that contains a size 1 and a size 31 case for each binop combination that should work with only .contains_properly. Three binary predicates are partially implemented in this PR: overlaps, intersects, and within.

The following tests are implemented in this binpred:

  • test_polygon_overlaps_point
  • test_max_polygons_overlaps_max_points
  • test_polygon_overlaps_polygon
  • test_max_polygon_overlaps_max_points
  • test_point_intersects_polygon_interior
  • test_max_points_intersects_max_polygons_interior
  • test_point_within_polygon
  • test_max_points_within_max_polygons
  • test_linestring_within_polygon
  • test_max_linestring_within_max_polygon
  • test_polygon_within_polygon
  • test_max_polygons_within_max_polygons
  • test_polygon_overlaps_linestring
  • test_max_polygons_overlaps_max_linestrings

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions bot added the Python Related to Python code label Dec 1, 2022
@thomcom thomcom added 3 - Ready for Review Ready for review by team feature request New feature or request non-breaking Non-breaking change labels Dec 2, 2022
@thomcom thomcom marked this pull request as ready for review December 2, 2022 19:21
@thomcom thomcom requested a review from a team as a code owner December 2, 2022 19:21
@thomcom thomcom requested review from cwharris, harrism and isVoid and removed request for cwharris December 2, 2022 19:21
@thomcom thomcom added improvement Improvement / enhancement to an existing function and removed feature request New feature or request labels Dec 5, 2022
@thomcom thomcom self-assigned this Dec 6, 2022
@thomcom thomcom added non-breaking Non-breaking change and removed non-breaking Non-breaking change labels Dec 6, 2022
Copy link
Contributor

@isVoid isVoid left a comment

Choose a reason for hiding this comment

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

Initial pass to the code. Strategy pattern does makes sense here.

Copy link
Contributor

@isVoid isVoid left a comment

Choose a reason for hiding this comment

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

Where's .contains_properly?

NM, it's from the last PR.

@thomcom
Copy link
Contributor Author

thomcom commented Dec 13, 2022

rerun tests

@isVoid
Copy link
Contributor

isVoid commented Dec 14, 2022

rerun tests

@thomcom
Copy link
Contributor Author

thomcom commented Dec 14, 2022

Thanks Mark, I updated the docs as you requested.

@thomcom thomcom added 4 - Needs Reviewer Waiting for reviewer to review or respond and removed 3 - Ready for Review Ready for review by team labels Dec 14, 2022
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

More doc suggestions, but pre-approving.

@thomcom
Copy link
Contributor Author

thomcom commented Dec 15, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit f262325 into rapidsai:branch-23.02 Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Needs Reviewer Waiting for reviewer to review or respond improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Related to Python code
Projects
Status: Done
3 participants