我发现有人问我如何绘制/导入道路以外的对象,但他/她没有得到答案。
这是链接:Plotting different area objects in OSMnx
我能够下载/安装OSMnx并在"https://github.com/gboeing/osmnx-examples.git“上运行OSMnx的示例。
我感兴趣的是水(即河流、水库、湖泊等)。
如何从Python导入和绘制Open Street Map的河流/水库/湖泊?
发布于 2019-03-07 22:25:51
根据this answer,对水道进行建模和绘制:
import osmnx as ox
ox.config(use_cache=True, log_console=True)
G = ox.graph_from_place('Amsterdam', retain_all=False, truncate_by_edge=False,
simplify=True, custom_filter='["waterway"~"canal"]')
fig, ax = ox.plot_graph(G)有关更多详细信息,请访问this example。
发布于 2019-03-07 15:54:14
我没有使用OSMnx的经验,但我想你可以下载一个常用的OSM extracts并对其进行过滤。例如,通过使用osmium-tool和使用natural=water或waterway=*提取elements tagged。然后将其导入到OSMnx中。
https://stackoverflow.com/questions/55033816
复制相似问题