本文介绍了根据最大长度细分边缘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在osmnx或networkx中,是否可以根据最大长度细分/重采样/分割街道边缘?

Is there any way in osmnx or networkx to subdivide/resample/split street edges based on a maximum length?

我正在基于地址进行最短路径路由,但是我的地图通常没有足够的节点分辨率,无法使节点距离每个地址足够近.细分边缘将使我可以插入更多节点.

I'm doing shortest path routing based on addresses, but my maps often don't have enough node resolution to put a node close enough to each address. Subdividing edges would allow me to insert more nodes.

推荐答案

查看此OSMnx PR ,其中包括对将边缘细分为50米的块的一些讨论.

Check out this OSMnx PR which includes some discussion of subdividing edges into 50 meter chunks.

尤其是,您可以使用OSMnx的redistribute_vertices 函数从此stackoverflow借用逻辑 QA .

In particular, you can use OSMnx's redistribute_vertices function which borrows logic from this stackoverflow QA.

这篇关于根据最大长度细分边缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 22:26