使用OpenStreetMap和OSMNX检索covidd出式发布周期

使用OpenStreetMap和OSMNX检索covidd出式发布周期,第1张

使用OpenStreetMap和OSMNX检索covidd出式发布周期

您可以使用OSMnx查询方式标签/值组合,如文档和用法示例中所述。例如,如您在OSM上看到的,标签为

cycleway:right
,其值为
lane

import networkx as nximport osmnx as oxox.config(use_cache=True)place = 'Bologna, Italia'# get everything with a 'cycleway' tagcf = '["cycleway"]'G = ox.graph_from_place(place, custom_filter=cf)print(len(G))# get everything with a 'cycleway:left' tagcf = '["cycleway:left"]'G = ox.graph_from_place(place, custom_filter=cf)print(len(G))# get everything with a 'cycleway:right' tagcf = '["cycleway:right"]'G = ox.graph_from_place(place, custom_filter=cf)print(len(G))# get everything with a 'cycleway:right' tag if its value is 'lane'cf = '["cycleway:right"="lane"]'G = ox.graph_from_place(place, custom_filter=cf)print(len(G))# get everything with a 'cycleway:right' or 'cycleway:left' tagcf1 = '["cycleway:left"]'cf2 = '["cycleway:right"]'G1 = ox.graph_from_place(place, custom_filter=cf1)G2 = ox.graph_from_place(place, custom_filter=cf2)G = nx.compose(G1, G2)print(len(G))


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5655537.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存