Osmnx:从街道的一侧移除人行道

Osmnx: Removing sidewalk from one side of the street

我正在尝试使用带有 python 2.7 的 Osmnx 库为我的大学校园内的行人绘制简化地图。 到目前为止,我有这个 Image of the plot 并且如您所见,它正在绘制街道两侧的人行道。我正计划从这里移除人行道的一侧。

但是我很困惑用什么逻辑来处理这个问题?

到目前为止,我已经创建了一个自定义过滤器来仅绘制人行道

custom_walk = ('["area"!~"yes"]["highway"="footway"]["foot"!~"no"]["service"!~"private"]{}').format(ox.settings.default_access)

G = ox.graph_from_bbox(top, bottom,right, left, custom_filter= custom_walk)

ox.plot_graph(G_projected,save = True,filename = "maps", show = False,node_size=5,node_color='#FFFFFF',node_edgecolor='#FFFFFF',edge_color='#cccccc',bgcolor = "#000000",node_zorder=3,dpi=300, edge_linewidth=5,use_geom=True)

ox.simplify.clean_intersections(G,tolerance=100) 

我想了解的是 Osmnx 是否与人行道有某种关系,可以告诉我他们与最近街道的相对位置(如果他们在街道的东侧或北侧(那样我可以对哪些人行道是可见的保持标准)?或者如果这里有更简单的逻辑?

谢谢!

What I am trying to understand is does Osmnx have relations for footways in a way that will tell me their relative position to the nearest street (if they are on the east or the north side of the street (that way I can keep a standard on what sidewalks are visible)? Or if there is a simpler logic at this?

答案是否定的,OSMnx 不知道人行道相对于最近街道的位置。一种选择可能是只识别不需要的人行道边缘,列出它们的 OSM ID,然后将它们从图表中删除。