Esempio n. 1
0
update_status(0)

point_coords = (float(lat), float(lng))
B = Building(point_coords=point_coords)
B.download_buildings()
B.plot_buildings(imgs_folder=results_folder)
update_status(1)

B.merge_and_convex(plot=True, imgs_folder=results_folder, status_to_file=True)
B.plot_merged_buildings(imgs_folder=results_folder)
B.create_gif_merging(imgs_folder=results_folder)
update_status(2)

B.assign_nodes()
B.plot_nodes(imgs_folder=results_folder)
update_status(3)

B.assign_edges_weights()
B.plot_edges(imgs_folder=results_folder)
update_status(4)

B.assign_network()
B.plot_net(imgs_folder=results_folder, style="edge_color")
update_status(5)

B.plot_buildings_color(imgs_folder= results_folder)
update_status(6)

B.save_config(os.path.join(results_folder, "config.json"))

Esempio n. 2
0
t1 = time.time()
B.create_gif_merging(imgs_folder=output_folder)
print("gif of merged buildings intermediates created in  %.2f seconds" %
      (time.time() - t1))

t1 = time.time()
print("assigning nodes...")
B.assign_nodes()
print("finished assigning nodes in %.2f seconds" % (time.time() - t1))
t1 = time.time()
B.plot_nodes(imgs_folder=output_folder, show=False)
print("plotted nodes %.2f seconds" % (time.time() - t1))

t1 = time.time()
print("assigning edges...")
B.assign_edges_weights(distance_threshold=distance_threshold)
print("finished assigning edges in %.2f seconds" % (time.time() - t1))
t1 = time.time()
B.plot_edges(imgs_folder=output_folder, show=False)
print("plotted edges %.2f seconds" % (time.time() - t1))

t1 = time.time()
print("assigning network...")
B.assign_network()
print("finished assigning network in %.2f seconds" % (time.time() - t1))
t1 = time.time()
B.plot_net(imgs_folder=output_folder, show=False)
print("plotted network in %.2f seconds" % (time.time() - t1))

t1 = time.time()
B.plot_buildings_color(imgs_folder=output_folder, show=False)