首页 > 解决方案 > Osmnx 将大图保存为 graphml

问题描述

我正在下载一个大型街道网络(柏林)。当我尝试将其保存到光盘时,我的笔记本电脑几个小时内什么也没做。

这正常吗?

我的代码:

ox.save_graphml(G,“some_place.graphml“)

标签: pythonopenstreetmaposmnx

解决方案


I would guess that can be normal. Is your CPU load indicator of your system showing that something is happening?

You have the following options:

  • try a smaller street network and see if it finishes faster - to check if it works basically
  • if you are on Linux you could execute your script with strace python myscript.py - you would see the low level system calls and notice if something is happening :-)
  • Or try a python debugger and debug into the function

推荐阅读