修改项目启动读取的目标路网文件

This commit is contained in:
wangxu 2025-12-01 18:54:21 +08:00
parent a10a0bdd07
commit a5f768bb0f
1 changed files with 3 additions and 3 deletions

View File

@ -17,8 +17,8 @@ from app.global_source import *
def load_roadnet_by_city(citycode: int):
logging.info('start load roadnet for %d' % citycode)
net_filename = 'data/xl_roadnet_%d.txt' % citycode
roadinfo_filename = 'data/xl_roadinfo_%d.txt' % citycode
net_filename = './../common_roadnet/data/xl_roadnet_%d.txt' % citycode
roadinfo_filename = './../common_roadnet/data/xl_roadinfo_%d.txt' % citycode
# roadlinks_filename = 'data/xl_roadlinks_%d.txt' % citycode
g_roadnet.load_from_file(net_filename, citycode)
g_roadinfo_manager.load_from_file(roadinfo_filename)
@ -77,7 +77,7 @@ def load_all_roadnet():
reload_base_info(citycode)
else:
# 加载data目录下的所有城市的roadnet
citycode_set = list_all_citycode('./data')
citycode_set = list_all_citycode('../common_roadnet/data')
for citycode in citycode_set:
load_roadnet_by_city(citycode)
global g_roadnet, g_roadinfo_manager