Osmnx:如何在busstop信息节点上检索信息,该节点是高速公路的一部分?

2024-06-10 13:50:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我还试图显示OpenStreetMap公交站点节点439460636(https://www.openstreetmap.org/node/439460636)的信息,它是高速公路的一部分。在

我用的是python3osmnx

其他的poi都很完美。只是不是那些没有被映射成“便利设施”的。(还有更多的例子)

我使用jupyter笔记本进行分析:

import osmnx as ox

# Retrieve POI shelters
place_name = 'Santa Clara, Santa Clara County, California, USA'
shelter = ox.pois_from_place(place_name, amenities=['shelter'])
cols = ['amenity', 'name', 'element_type', 'shelter_type',
       'building', 'network'
        ]
shelter[cols]
^{pr2}$
# Look bus-stop in highway
graph = ox.graph_from_place(place_name)
nodes, edges = ox.graph_to_gdfs(graph)
nodes.loc[(nodes['highway'] == 'bus_stop') ]

天桥:

[out:json][timeout:25];
// gather results
(
  area[name="Santa Clara, Santa Clara County, California, USA"];
  node(area)["highway"="bus_stop"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

POIKino (439460636)未列出。就在POI旁边的避难所列出来了。POI在我的区域中间,所以我不知道如何检索节点信息。你能帮忙吗?在


Tags: namenode节点placesantaoutgraphox
1条回答
网友
1楼 · 发布于 2024-06-10 13:50:27

用chesterharvey在这篇文章中链接的文件手动更新Osmnx。https://github.com/gboeing/osmnx/issues/116#issuecomment-439577495 功能的最终测试仍未完成!在

import osmnx as ox

# Specify the name that is used to seach for the data
place_name = "Santa Clara, Santa Clara County, California, USA"

tags = {
    'amenity':True,
    'leisure':True,
    'landuse':['retail','commercial'],
    'highway':'bus_stop',
}

all_pois = ox.pois_from_place(place=place_name, tags=tags)
^{pr2}$

相关问题 更多 >