Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print out the total processing time at the end of the process #13

Open
asu-trans-ai-lab opened this issue Jan 29, 2023 · 3 comments
Open

Comments

@asu-trans-ai-lab
Copy link

Currently, only the information below is given, but we need to know the total processing time for large networks. --
Building Network from OSM file
reading osm file
parsing osm network
generating nodes and links
number of nodes: 52820, number of links: 75395, number of pois: 0
Consolidating Complex Intersections
1324 intersections have been consolidated
Outputting Network Files

@qyanswerai
Copy link

Is anything printed after ‘Outputting Network Files’? My code keeps running indefinitely even when dealing with a small map file.

@jiawlu
Copy link
Owner

jiawlu commented Sep 9, 2024

Is anything printed after ‘Outputting Network Files’? My code keeps running indefinitely even when dealing with a small map file.

@qyanswerai can you provide the OS version, osm2gmns version, and the commands you are using?

@qyanswerai
Copy link

qyanswerai commented Sep 9, 2024

thank you, I use windows and the osm2gmns version is 0.7.6
the code is as follows:

`import osm2gmns as og

class NetworkOSM:
@staticmethod
def network_data_pbf(file_name, save_path):
# download .osm.pbf from Geofabrik:https://download.geofabrik.de/asia/china.html
net = og.getNetFromFile(filename=file_name, network_types='auto',
link_types={'motorway', 'trunk'},
strict_mode=False, combine=True)
og.consolidateComplexIntersections(net, auto_identify=True)
og.outputNetToCSV(net, output_folder=f'{save_path}', encoding='utf_8_sig')

if name == 'main':
# 以上海市为例,根据OSM文件提取links、nodes
file_name = f'data/shanghai-latest.osm.pbf'
NetworkOSM.network_data_pbf(file_name=file_name, save_path='network_data')`

Additional note:
1、The program has the following log information and the file can be generated normally
Building Network from OSM file
reading osm file
parsing osm network
generating nodes and links
combining links
before: 13828 nodes, 14894 links
after: 5717 nodes, 6783 links
number of nodes: 5717, number of links: 6783, number of pois: 0
Consolidating Complex Intersections
48 intersections have been consolidated
Outputting Network Files
2、however, the number of node.csv lines and links.csv lines are not equal to those in the log (5717 nodes, 6783 links), but very close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants