-
Notifications
You must be signed in to change notification settings - Fork 32
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
coordinates_for_segment: add optional parent_element… #492
base: master
Are you sure you want to change the base?
Conversation
…to ensure that the given polygon is fully contained within that parent's polygon.
Codecov Report
@@ Coverage Diff @@
## master #492 +/- ##
==========================================
- Coverage 80.12% 79.03% -1.10%
==========================================
Files 40 40
Lines 2390 2485 +95
Branches 443 482 +39
==========================================
+ Hits 1915 1964 +49
- Misses 403 433 +30
- Partials 72 88 +16
Continue to review full report at Codecov.
|
interp = childp.intersection(parentp) | ||
if interp.is_empty: | ||
# FIXME: we need a better strategy against this | ||
raise Exception("intersection of would-be segment with parent is empty") |
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.
Do we want to be robust against such blatant errors?
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.
Yes, probably just show a warning. But we have no context for localizing the message at that point...
…to ensure that the given polygon is fully contained
within that parent's polygon.
Fixes #489.
But please don't merge yet, I have another, better idea