Update app.py
Browse files
app.py
CHANGED
@@ -60,8 +60,10 @@ def process_buildings(input_gdf, sensitive_sites_gdf, default_building_height_m,
|
|
60 |
else:
|
61 |
building_intersect_desc = f"Building {idx} ({building_name}), height: {building_height_ft}, buffer distance: {buffer_distance_ft} is not in the vicinity of any sensitive sites."
|
62 |
|
63 |
-
intersection_desc
|
64 |
-
|
|
|
|
|
65 |
|
66 |
return buffers, intersected_sites, intersection_desc
|
67 |
|
@@ -132,10 +134,10 @@ def ss_intersect(geojson1, ss_geoselect, multiplier_factor, default_building_hei
|
|
132 |
extent = get_max_extent(input_gdf, buffers_gdf)
|
133 |
|
134 |
# Create and save the plot
|
135 |
-
|
136 |
|
137 |
# Return the image
|
138 |
-
return
|
139 |
|
140 |
|
141 |
iface = gr.Interface(
|
|
|
60 |
else:
|
61 |
building_intersect_desc = f"Building {idx} ({building_name}), height: {building_height_ft}, buffer distance: {buffer_distance_ft} is not in the vicinity of any sensitive sites."
|
62 |
|
63 |
+
if intersection_desc == "":
|
64 |
+
intersection_desc = building_intersect_desc
|
65 |
+
else:
|
66 |
+
intersection_desc += "\n" + building_intersect_desc
|
67 |
|
68 |
return buffers, intersected_sites, intersection_desc
|
69 |
|
|
|
134 |
extent = get_max_extent(input_gdf, buffers_gdf)
|
135 |
|
136 |
# Create and save the plot
|
137 |
+
create_plot('output_image.png', extent, input_gdf, intersected_sites_gdf, buffer_union_gdf)
|
138 |
|
139 |
# Return the image
|
140 |
+
return 'output_image.png', "building_buffers.geojson", "buffer_union.geojson", intersection_desc
|
141 |
|
142 |
|
143 |
iface = gr.Interface(
|