-
Notifications
You must be signed in to change notification settings - Fork 0
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
chip away some refactors in geometry.py
#46
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
=====================================
Coverage 98.1% 98.1%
=====================================
Files 6 6
Lines 880 891 +11
=====================================
+ Hits 863 874 +11
Misses 17 17
|
@@ -236,7 +237,7 @@ def voronoi_skeleton( | |||
if edgelines.shape[0] > 0: | |||
# if there is no explicit snapping target, snap to the boundary of the polygon | |||
# via the shortest line. That is by definition always within the polygon | |||
# (Martin thinks) | |||
# (Martin thinks) (James concurs) |
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.
❤️
sgeop/geometry.py
Outdated
def _last_point(line: shapely.LineString) -> shapely.Point: | ||
"""Helper for returning final point on a line.""" | ||
return shapely.get_point(line, -1) |
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'd probably prefer using shapely.get_point(line, -1)
and it is explicit
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've got no problem with that. I'll dump that helper and remove from testing.
This PR:
geometry.py
geometry.snap_to_targets()
& breaks out some helper funds