python - osmnx simple_graph 不会删除所有不是交集的节点
问题描述
我正在使用 Osmnx 来简化我的图表。我已经尝试过严格的 True 和 false,但我的图表仍然有中间节点,它们不是交互。
G3 = ox.graph_from_file( osm_simplified_file, bidirectional=False,simplify=False, retain_all=False, name='unnamed')
G3 = ox.simplify_graph(G3, strict=False)
G3 = ox.remove_isolated_nodes(G3);
G3 = ox.get_largest_component(G3,strongly=True);
ox.plot_graph(G3,......)
简化后的路网仍然包含度数为二的节点(两个邻居)。如何完全删除所有没有交集的中间节点?
解决方案
推荐阅读
- r - 如何在面板数据r中绘制滞后变量
- visual-studio-code - VSCode - 如何使用另一种编码缩小文件?
- javascript - 热计算逗号并将其分隔在一个数组中?
- php - 显示有关用户角色和帖子 ID 的内容
- cloudflare-workers - Cloudflare 工作人员的安全性和可见性
- excel - Excel VBA - 如果未选中框,则清除单元格
- javascript - 如何避免 setTimeout 被覆盖?
- java - 从 Android 手机设备访问 RaspberryPi (Linux)
- javascript - 根据先前的选择框选项显示数据库中的选择框选项
- android - 在 Flutter 上显示空白屏幕的 Agora 本地视图