按照说明安装OSMnx(包括显式安装spatialindex
)后
brew install spatialindex
pip install osmnx
运行第一个基本示例
import osmnx as ox
G = ox.graph_from_place('Manhattan Island, New York City, New York, USA', network_type='drive')
ox.plot_graph(ox.project_graph(G))
在项目的自述文件中,我得到
Traceback (most recent call last):
File "/Users/Rax/Documents/Projects/Coding/Python/maps/test.py", line 23, in <module>
G = ox.graph_from_place('Manhattan Island, New York City, New York, USA', network_type='drive')
File "/usr/local/lib/python2.7/site-packages/osmnx/core.py", line 1850, in graph_from_place
raise TypeError('query must be a string or a list of query strings')
TypeError: query must be a string or a list of query strings
如何让 OSMnx 运行超过此错误?