You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BowPy-master/bowpy/misc/read.py in
---> 10 from nmpy.util.base import read_ahx
11 from bowpy.util.array_util import attach_network_to_traces, attach_coordinates_to_traces
12 import warnings
ModuleNotFoundError: No module named 'nmpy'
Furthermore, I had to change a lot of indizes to int(index).
The function def dist_point_to_segment is depreceated from mpl. I had to add it manually.
def dist_point_to_segment(p, s0, s1):
"""
Get the distance of a point to a segment.
*p*, *s0*, *s1* are *xy* sequences
This algorithm from
http://geomalgorithms.com/a02-_lines.html
"""
p = np.asarray(p, float)
s0 = np.asarray(s0, float)
s1 = np.asarray(s1, float)
v = s1 - s0
w = p - s0
c1 = np.dot(w, v)
if c1 <= 0:
return dist(p, s0)
c2 = np.dot(v, v)
if c2 <= c1:
return dist(p, s1)
b = c1 / c2
pb = s0 + b * v
return dist(p, pb)
The text was updated successfully, but these errors were encountered:
Furthermore, I had to change a lot of indizes to int(index).
The function def dist_point_to_segment is depreceated from mpl. I had to add it manually.
The text was updated successfully, but these errors were encountered: