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

Interpolated segments for rt_segment_speeds #1084

Merged
merged 12 commits into from
May 1, 2024
4 changes: 2 additions & 2 deletions _shared_utils/shared_utils/rt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,10 @@ def arrowize_segment(line_geometry, buffer_distance: int = 20):
end = shapely.ops.substring(end_segment, end_segment.length, end_segment.length) # correct
r_shift = end_segment.parallel_offset(shift_distance, "right")
r_pt = shapely.ops.substring(r_shift, 0, 0)
r_pt2 = shapely.ops.substring(r_shift, r_shift.length - arrow_distance, r_shift.length - arrow_distance)
r_pt2 = shapely.ops.substring(r_shift, r_shift.length, r_shift.length)
l_shift = end_segment.parallel_offset(shift_distance, "left")
l_pt = shapely.ops.substring(l_shift, 0, 0)
l_pt2 = shapely.ops.substring(l_shift, arrow_distance, arrow_distance)
l_pt2 = shapely.ops.substring(l_shift, l_shift.length, l_shift.length)
t1 = shapely.geometry.Polygon((l_pt2, end, l_pt)) # triangles to cut top of arrow
t2 = shapely.geometry.Polygon((r_pt2, end, r_pt))

Expand Down
Loading
Loading