在OSMNX边缘上找到中心点的坐标
我希望在OSMNX网络的任何边缘上找到中心点的坐标(LAT,LON)。
例如,我的网络是:
G=ox.graph_from_place('San Diego County, CA', network_type='drive')
I am looking to find the coordinates (Lat, Lon) of a center point on any edge of a network of OSMNX.
For instance my network is:
G=ox.graph_from_place('San Diego County, CA', network_type='drive')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用Shapely使用
插值
函数。得出图形每个边缘的中点。
绘制图形。节点用红色表示。边缘的中点用绿色表示。
输出(显示的裁剪图像):

Use the
interpolate
function from shapely.Derive midpoint for every edge of the graph.
Plot the graph. Nodes are denoted by red. Midpoints of edges are denoted by green.
Output (cropped image shown):
