G5 = ox.graph_from_place('Manhattan, New York City, New York, USA')
G5_projected = ox.project_graph(G5)
fig, ax = ox.plot_graph(G5_projected)
TypeError Traceback (most recent call last)
in ()
1 # # create the street network within the region of Chittagong
----> 2 G5 = ox.graph_from_place('Chittagong, Chittagong, Bangladesh')
3 G5_projected = ox.project_graph(G5)
4 fig, ax = ox.plot_graph(G5_projected)
/home/philipp/anaconda3/envs/env_geotiff/lib/python2.7/site-packages/osmnx/osmnx.pyc in graph_from_place(query, network_type, simplify, retain_all, truncate_by_edge, name, which_result, buffer_dist, timeout, memory, max_query_area_size, clean_periphery)
1814 # create graph using this polygon(s) geometry
1815 G = graph_from_polygon(polygon, network_type=network_type, simplify=simplify, retain_all=retain_all,
-> 1816 truncate_by_edge=truncate_by_edge, name=name, timeout=timeout, memory=memory, max_query_area_size=max_query_area_size, clean_periphery=clean_periphery)
1817
1818 log('graph_from_place() returning graph with {:,} nodes and {:,} edges'.format(len(G.nodes()), len(G.edges())))
/home/philipp/anaconda3/envs/env_geotiff/lib/python2.7/site-packages/osmnx/osmnx.pyc in graph_from_polygon(polygon, network_type, simplify, retain_all, truncate_by_edge, name, timeout, memory, max_query_area_size, clean_periphery)
1740 # get the network data from OSM, create the buffered graph, then truncate it to the buffered polygon
1741 response_jsons = osm_net_download(polygon=polygon_buffered, network_type=network_type, timeout=timeout, memory=memory, max_query_area_size=max_query_area_size)
-> 1742 G_buffered = create_graph(response_jsons, name=name, retain_all=True, network_type=network_type)
1743 G_buffered = truncate_graph_polygon(G_buffered, polygon_buffered, retain_all=True, truncate_by_edge=truncate_by_edge)
1744
/home/philipp/anaconda3/envs/env_geotiff/lib/python2.7/site-packages/osmnx/osmnx.pyc in create_graph(response_jsons, name, retain_all, network_type)
1499 G = get_largest_component(G)
1500
-> 1501 log('Created graph with {:,} nodes and {:,} edges in {:,.2f} seconds'.format(len(G.nodes()), len(G.edges()), time.time()-start_time))
1502
1503 # add length (great circle distance between nodes) attribute to each edge to use as weight
TypeError: object of type 'generator' has no len()