Skip to content

Commit

Permalink
Merge pull request #916 from pysal/util.compute_length
Browse files Browse the repository at this point in the history
Util.compute length
  • Loading branch information
jGaboardi committed Mar 15, 2017
2 parents b4de6e1 + 07b626c commit fa1e811
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pysal/network/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,8 @@ def allneighbordistances(self, sourcepattern, destpattern=None, fill_diagonal=No
if set1 == set2: # same edge
x1,y1 = sourcepattern.snapped_coordinates[p1]
x2,y2 = destpattern.snapped_coordinates[p2]
xd = x1-x2
yd = y1-y2
nearest[p1,p2] = np.sqrt(xd*xd + yd*yd)
computed_length = util.compute_length((x1,y1),(x2,y2))
nearest[p1,p2] = computed_length

else:
ddist1, ddist2 = dest_dist_to_node[p2].values()
Expand Down

0 comments on commit fa1e811

Please sign in to comment.