【发布时间】:2020-07-19 15:46:51
【问题描述】:
我通常是 OSMnx 和 Overpass 查询的新手。我试图了解在使用非街道基础设施类型时编写自定义查询的正确方法。
具体来说,我想了解为什么这个查询有效
import osmnx as ox
my_custom_filter = '["railway"~"disused"]'
G = ox.graph_from_point((51.5073509,-0.1277583),
distance = 10000,
distance_type = 'bbox',
infrastructure = 'way["railway]',
network_type = 'none',
custom_filter = my_custom_filter
)
但是这个使用了一个错误的请求错误:
import osmnx as ox
my_custom_filter = '["railway"~"disused"]'
G = ox.graph_from_point((51.5073509,-0.1277583),
distance = 10000,
distance_type = 'bbox',
infrastructure = 'way["railway~"rail"]',
network_type = 'none',
custom_filter = my_custom_filter
)
注意区别只是我在后面的查询中指定 rail 作为铁路的类型。
在此处查看OSM Railway Guide。
如果有人可以向我指出任何可以帮助我进一步了解如何构建自定义过滤器的资源 - 特别是具有多个过滤器的自定义过滤器,那也很好。例如,添加额外客户过滤器的正确语法是什么。
【问题讨论】:
标签: openstreetmap overpass-api osmnx