Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[BACKPORT] Little tweak for #537, remove volcano name and update defa…

…ult value.
  • Loading branch information...
commit 0dd0581fc48fa22831f722c1c96a7ca4c2a5b6fe 1 parent c7c8e5b
@ismailsunni ismailsunni authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 safe/impact_functions/volcanic/volcano_building_impact.py
View
10 safe/impact_functions/volcanic/volcano_building_impact.py
@@ -45,8 +45,7 @@ class VolcanoBuildingImpact(FunctionProvider):
'hazard zones for each Kawasan Rawan Bencana or radius.')
parameters = OrderedDict([
- ('distances [km]', [1, 2, 3, 5, 10]),
- ('volcano_name', 'All')])
+ ('distances [km]', [3, 5, 10])])
def run(self, layers):
"""Risk plugin for volcano hazard on building/structure
@@ -131,7 +130,7 @@ def run(self, layers):
categories[cat] = 0
# Count affected population per polygon and total
- total_affected = 0
+ # total_affected = 0
for attr in P.get_data():
# Update building count for associated polygon
@@ -144,7 +143,7 @@ def run(self, layers):
categories[cat] += 1
# Update total
- total_affected += 1
+ # total_affected += 1
# Count totals
total = len(my_exposure)
@@ -153,8 +152,7 @@ def run(self, layers):
table_body = [question,
TableRow([tr('Distance [km]'), tr('Total'),
tr('Cumulative')],
- header=True),
- TableRow([tr('All'), format_int(total_affected), ''])]
+ header=True)]
cum = 0
for name in category_names:
Please sign in to comment.
Something went wrong with that request. Please try again.