Skip to content

Commit

Permalink
[2018-03-30 16:27:22] update BFS in treeMap script
Browse files Browse the repository at this point in the history
  • Loading branch information
hijiangtao committed Mar 31, 2018
1 parent 68936b3 commit eb70592
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/tripFlow/constructTreeMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,15 @@ def BFSOneTreeMap(self, parentNode, recordNum=0, treeQueue=[], currentDis=0):
if treeStructID in self.keepTreeStructList[cateName]:
continue

self.treeNodesID += 1
self.currentData[cateName]['count'] += 1

# 距离判断 START
dis = currentDis + getRealDistance(parentNode[0], parentNode[1], vertex[0], vertex[1])
if dis > self.custom_params['max_distance'] * 1000:
continue
# 距离判断 END

self.treeNodesID += 1
self.currentData[cateName]['count'] += 1

subres = {
"root": {
"id": self.treeNodesID,
Expand Down

0 comments on commit eb70592

Please sign in to comment.