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(GeomUtil): fix point_in_polygon, expand unit tests #1423

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Nov 3, 2023

There were a few bugs in the point_in_polygon() routine added in #1407 (off-by-n errors and premature termination). The test included in that PR was only a very basic case (unit square) and so did not catch these. Fix the issues and add test cases for other geometries:

  • triangle
  • irregular pentagon

Tests are also refactored a bit for easier future expansion and nicer messages on failure

@wpbonelli wpbonelli marked this pull request as ready for review November 3, 2023 18:34
Copy link
Contributor

@langevin-usgs langevin-usgs left a comment

Choose a reason for hiding this comment

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

Hey @wpbonelli, this looks good to me. Nice to see the additional tests.

@wpbonelli wpbonelli merged commit e125e2f into MODFLOW-USGS:develop Nov 3, 2023
15 checks passed
@wpbonelli wpbonelli deleted the fix-pip branch November 3, 2023 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants