Open anastassiavybornova opened 2 months ago
lyon: Successfully wrote graph car30
lyon: Successfully wrote graph carall
lyon: No OSM data for graph bike_cyclestreet. Created empty graph.
lyon: Successfully wrote graph biketrack
lyon: Successfully wrote graph bikeable
lyon: Successfully wrote graph biketrackcarall
lyon: Successfully wrote graph biketrack_simplified
lyon: Successfully wrote graph carall_simplified
lyon: Successfully wrote graph bikeable_simplified
lyon: Successfully wrote graph biketrackcarall_simplified
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[4], [line 4](vscode-notebook-cell:?execution_count=4&line=4)
[2](vscode-notebook-cell:?execution_count=4&line=2) if placeinfo["nominatimstring"] != '':
[3](vscode-notebook-cell:?execution_count=4&line=3) location = ox.geocoder.geocode_to_gdf(placeinfo["nominatimstring"])
----> [4](vscode-notebook-cell:?execution_count=4&line=4) location = fill_holes(extract_relevant_polygon(placeid, shapely.geometry.shape(location['geometry'][0])))
[5](vscode-notebook-cell:?execution_count=4&line=5) if debug: # Draw location polygons and their holes
[6](vscode-notebook-cell:?execution_count=4&line=6) try:
File ~/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/functions.py:38, in extract_relevant_polygon(placeid, mp)
[36](https://file+.vscode-resource.vscode-cdn.net/Users/anvy/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/~/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/functions.py:36) p = max(mp, key=lambda a: a.bounds[-1])
[37](https://file+.vscode-resource.vscode-cdn.net/Users/anvy/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/~/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/functions.py:37) else:
---> [38](https://file+.vscode-resource.vscode-cdn.net/Users/anvy/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/~/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/functions.py:38) p = max(mp, key=lambda a: a.area)
[39](https://file+.vscode-resource.vscode-cdn.net/Users/anvy/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/~/Library/CloudStorage/OneDrive-ITU/projects/bikenwgrowth/code/functions.py:39) return p
TypeError: 'MultiPolygon' object is not iterable
collecting all my notes in one issue here, will distribute later
installing environment
src
folder) instead of%run
(or what is the reason it is like this now? hpc related issues?)cities
for demo run01_prepare_networks.ipynb