Skip to content

Commit c973df9

Browse files
openstreetmap tutorial: save_path is a path, not a string anymore
1 parent fb36337 commit c973df9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/tutorial/climada_entity_openstreetmap.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@
324324
"source": [
325325
"# For an exposure, we are generally interested in the high value areas. \n",
326326
"# -> Invert low-vaue area within the bounding box\n",
327-
"High_Value_gdf_47_8 = OSM.get_highValueArea([47.16, 8.0, 47.3, 8.0712], save_path = save_path, \\\n",
328-
" Low_Value_gdf = save_path+'/OSM_features_47_8.shp')"
327+
"High_Value_gdf_47_8 = OSM.get_highValueArea([47.16, 8.0, 47.3, 8.0712], save_path=save_path, \n",
328+
" Low_Value_gdf=save_path / 'OSM_features_47_8.shp')"
329329
]
330330
},
331331
{
@@ -427,8 +427,8 @@
427427
],
428428
"source": [
429429
"# One command does it all (getting LitPop Exp, re-assigning values, converting back into exposure format)\n",
430-
"exposure_high_47_8 = OSM.get_osmstencil_litpop([47.16, 8.0, 47.3, 8.0712],'CHE',\"proportional\", highValueArea = \\\n",
431-
" save_path + '/High_Value_Area_47_8.shp' , save_path = save_path) "
430+
"exposure_high_47_8 = OSM.get_osmstencil_litpop([47.16, 8.0, 47.3, 8.0712], 'CHE', 'proportional',\n",
431+
" highValueArea=save_path / 'High_Value_Area_47_8.shp', save_path=save_path)"
432432
]
433433
},
434434
{
@@ -512,10 +512,10 @@
512512
"source": [
513513
"# Query all items tagged \"building\" in OSM.\n",
514514
"\n",
515-
"save_path = save_path = 'your_path_to_save_directory' #'/Users/evelynm/Documents/ETH/Flood_Landslide/CLIMADA_backup/OSM_exposure/data_overpy/test_Lucerne'\n",
515+
"save_path = 'your_path_to_save_directory' #'/Users/evelynm/Documents/ETH/Flood_Landslide/CLIMADA_backup/OSM_exposure/data_overpy/test_Lucerne'\n",
516516
"\n",
517517
"High_val_houses_47_8 = OSM.get_features_OSM([47.16, 8.0, 47.3, 8.0712],\n",
518-
" {'building'}, save_path = save_path, check_plot=1)"
518+
" {'building'}, save_path=save_path, check_plot=1)"
519519
]
520520
},
521521
{
@@ -643,11 +643,11 @@
643643
],
644644
"source": [
645645
"# Default\n",
646-
"buildings_47_8_default = OSM.make_osmexposure(save_path+'/OSM_features_47_8.shp', mode = 'default', \n",
647-
" save_path = save_path, check_plot=1)\n",
646+
"buildings_47_8_default = OSM.make_osmexposure(save_path / 'OSM_features_47_8.shp', mode = 'default', \n",
647+
" save_path=save_path, check_plot=1)\n",
648648
"# With LitPop values\n",
649-
"buildings_47_8_LitPop = OSM.make_osmexposure(save_path+'/OSM_features_47_8.shp', country = 'CHE', mode=\"LitPop\", \n",
650-
" save_path = save_path, check_plot=1)"
649+
"buildings_47_8_LitPop = OSM.make_osmexposure(save_path / 'OSM_features_47_8.shp', country = 'CHE', mode=\"LitPop\", \n",
650+
" save_path=save_path, check_plot=1)"
651651
]
652652
},
653653
{
@@ -763,7 +763,7 @@
763763
"# Example: Streets and Houses in Tegucigalpa, Honduras (building inventory clearly incomplete):\n",
764764
"save_path = '/Users/evelynm/Documents/ETH/Flood_Landslide/CLIMADA_backup/OSM_exposure/data_overpy/test_Tegu'\n",
765765
"Infrastructure_Tegu = OSM.get_features_OSM([14.0318,-87.368,14.1318,-87.2568],\\\n",
766-
" {'building','highway'}, save_path = save_path, check_plot=1)"
766+
" {'building','highway'}, save_path=save_path, check_plot=1)"
767767
]
768768
}
769769
],

0 commit comments

Comments
 (0)