|
324 | 324 | "source": [ |
325 | 325 | "# For an exposure, we are generally interested in the high value areas. \n", |
326 | 326 | "# -> 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')" |
329 | 329 | ] |
330 | 330 | }, |
331 | 331 | { |
|
427 | 427 | ], |
428 | 428 | "source": [ |
429 | 429 | "# 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)" |
432 | 432 | ] |
433 | 433 | }, |
434 | 434 | { |
|
512 | 512 | "source": [ |
513 | 513 | "# Query all items tagged \"building\" in OSM.\n", |
514 | 514 | "\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", |
516 | 516 | "\n", |
517 | 517 | "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)" |
519 | 519 | ] |
520 | 520 | }, |
521 | 521 | { |
|
643 | 643 | ], |
644 | 644 | "source": [ |
645 | 645 | "# 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", |
648 | 648 | "# 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)" |
651 | 651 | ] |
652 | 652 | }, |
653 | 653 | { |
|
763 | 763 | "# Example: Streets and Houses in Tegucigalpa, Honduras (building inventory clearly incomplete):\n", |
764 | 764 | "save_path = '/Users/evelynm/Documents/ETH/Flood_Landslide/CLIMADA_backup/OSM_exposure/data_overpy/test_Tegu'\n", |
765 | 765 | "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)" |
767 | 767 | ] |
768 | 768 | } |
769 | 769 | ], |
|
0 commit comments