打开osm.pbf'的最有效方法是什么。记忆消耗最低?
这是我所做的
from pyrosm import OSM
# Initialize the OSM parser object
osm = OSM('/DATA/user/nabih/indonesia-latest.osm.pbf')
# Read all drivable roads
drive_net = osm.get_network(network_type="driving")
,但这是内存错误
Here's what I did
from pyrosm import OSM
# Initialize the OSM parser object
osm = OSM('/DATA/user/nabih/indonesia-latest.osm.pbf')
# Read all drivable roads
drive_net = osm.get_network(network_type="driving")
But it is memory error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
https://osmcode.org/pyosmium/ 提供了一个库来解析OSm.pbf。据我所记得的,它们将记忆消耗降至最低,并提供不同的解析方式。
检查他们的
docude> document
用于基本用法教程和参考。他们的
github
提供安装说明。https://osmcode.org/pyosmium/ provides a library to parse a osm.pbf. From what I remember, they keep the memory consumption to the minimum and provide different modes of parsing.
Checkout their
documentation
for basic usage tutorial and references.The README of their
GitHub
provides installation instructions.