0

I am trying to plot a simplified map for pedestrians in my university campus using Osmnx library with python 2.7. So far, I have this Image of the plot and as you can see, it is plotting sidewalks on both sides of the street. I was planning on removing one side of the sidewalks from this.

However I'm confused what logic to approach this with?

So far, I have created a custom filter to plot only footways

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) 

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?

Thanks!

4

1 回答 1

0

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

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

于 2018-11-12T22:10:16.913 回答