def test_visualize_inventory(client): shelby_hospital_inv_id = "5a284f0bc7d30d13bc081a28" shelby_road_id = "5a284f2bc7d30d13bc081eb6" # get shelvy building inventory and road sh_bldg_inv = Dataset.from_data_service(shelby_hospital_inv_id, DataService(client)) sh_road = Dataset.from_data_service(shelby_road_id, DataService(client)) # visualize building inventory viz.plot_map(sh_bldg_inv, column="struct_typ", category=False, basemap=True) # visualize building inventory from geoserver viz.get_wms_map([sh_bldg_inv, sh_road]) viz.get_gdf_map([sh_bldg_inv, sh_road]) viz.get_gdf_wms_map([sh_bldg_inv], [sh_road]) assert True
def test_visualize_joplin_tornado_building(client): # testing datasets tornado_hazard_id = "5dfa32bbc0601200080893fb" joplin_bldg_inv_id = "5df7d0de425e0b00092d0082" viz.plot_tornado(tornado_hazard_id, client, basemap=False) tornado_dataset_id = HazardService(client).get_tornado_hazard_metadata( tornado_hazard_id)['datasetId'] tornado_dataset = Dataset.from_data_service(tornado_dataset_id, DataService(client)) viz.get_gdf_map([tornado_dataset]) # get joplin building inventory joplin_bldg_inv = Dataset.from_data_service(joplin_bldg_inv_id, DataService(client)) # using wms layer for joplin building inv. gdf will crash the browser viz.get_gdf_wms_map([tornado_dataset], [joplin_bldg_inv]) assert True