如何获得osmnx中的所有道路(包括私人道路和服务道路)?
我正在 osmnx 中使用以下命令从 OSM 服务器下载道路:
osmnx.graph.graph_from_polygon(polygon, network_type='all_private', simplify=True, retain_all=False, truncate_by_edge=False, clean_periphery=True, custom_filter=None)
我正在查看 network_type 参数的文档,您可以使用以下关键术语之一指定要下载的道路网络的子集:
“drive” ' - 获取可行驶的公共街道(但不是服务道路)
'drive_service' - 获取可行驶的街道,包括服务道路
'walk' - 获取行人可以使用的所有街道和路径(此网络类型忽略单向方向性)
'bike' - 获取骑自行车者可以使用的所有街道和路径
'all' - 下载所有非私有 OSM 街道和路径(这是默认网络类型,除非您指定不同的网络类型)
'all_private' - 下载所有 OSM 街道和路径,包括私人通道
我想获得所有可行驶的道路,包括服务和私人通道,但没有选择。有没有简单的方法可以做到这一点?或者我是否必须使用“all_private”值,然后过滤掉我不想包含的节点/边?
I am using the follwing command in osmnx to downlaod roads from the OSM server:
osmnx.graph.graph_from_polygon(polygon, network_type='all_private', simplify=True, retain_all=False, truncate_by_edge=False, clean_periphery=True, custom_filter=None)
I was looking at the documentation for the network_type parameter and you can specify which subset of the road network you want to download using one of the following key terms:
'drive' - get drivable public streets (but not service roads)
'drive_service' - get drivable streets, including service roads
'walk' - get all streets and paths that pedestrians can use (this network type ignores one-way directionality)
'bike' - get all streets and paths that cyclists can use
'all' - download all non-private OSM streets and paths (this is the default network type unless you specify a different one)
'all_private' - download all OSM streets and paths, including private-access ones
I want to get all drivable roads, including both service AND private access roads but there is no option for that. Is there an easy way to do this? Or do I have to use the "all_private" value and then filter out the nodes/edges I don't want to include?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论