|
@ -202,6 +202,14 @@ class DailyPreprocessor(): |
|
|
|
|
|
|
|
|
self.inter2node = dict(zip(inter['inter_no'], inter['node_id'])) |
|
|
self.inter2node = dict(zip(inter['inter_no'], inter['node_id'])) |
|
|
|
|
|
|
|
|
|
|
|
# ch2pa : child to parent |
|
|
|
|
|
self.ch2pa = {} |
|
|
|
|
|
for child_id in self.child_ids: |
|
|
|
|
|
parent_no = self.inter_node[self.inter_node.node_id==child_id].inter_no.iloc[0] |
|
|
|
|
|
sub_inter_node = self.inter_node[self.inter_node.inter_no==parent_no] |
|
|
|
|
|
self.ch2pa[child_id] = sub_inter_node[sub_inter_node.inter_type=='parent'].iloc[0].node_id |
|
|
|
|
|
self.dires = ['북', '북동', '동', '남동', '남', '남서', '서', '북서'] # 정북기준 시계방향으로 8방향 |
|
|
|
|
|
|
|
|
# ids |
|
|
# ids |
|
|
ids = {'node_ids' : self.node_ids, |
|
|
ids = {'node_ids' : self.node_ids, |
|
|
'parent_ids': self.parent_ids, |
|
|
'parent_ids': self.parent_ids, |
|
@ -400,13 +408,6 @@ class DailyPreprocessor(): |
|
|
컬럼명 : inter_no, phase_no, ring_type, move_no, inc_dire, out_dire, inc_angle, out_angle, inc_edge_id, out_edge_id, node_id |
|
|
컬럼명 : inter_no, phase_no, ring_type, move_no, inc_dire, out_dire, inc_angle, out_angle, inc_edge_id, out_edge_id, node_id |
|
|
''' |
|
|
''' |
|
|
|
|
|
|
|
|
ch2pa = {} # child to parent |
|
|
|
|
|
for child_id in self.child_ids: |
|
|
|
|
|
parent_no = self.inter_node[self.inter_node.node_id==child_id].inter_no.iloc[0] |
|
|
|
|
|
sub_inter_node = self.inter_node[self.inter_node.inter_no==parent_no] |
|
|
|
|
|
ch2pa[child_id] = sub_inter_node[sub_inter_node.inter_type=='parent'].iloc[0].node_id |
|
|
|
|
|
self.dires = ['북', '북동', '동', '남동', '남', '남서', '서', '북서'] # 정북기준 시계방향으로 8방향 |
|
|
|
|
|
|
|
|
|
|
|
# 각 uturn node에 대하여 (inc_edge_id, out_edge_id) 부여 |
|
|
# 각 uturn node에 대하여 (inc_edge_id, out_edge_id) 부여 |
|
|
cmatches = [] |
|
|
cmatches = [] |
|
|
for _, row in self.uturn.iterrows(): |
|
|
for _, row in self.uturn.iterrows(): |
|
|