Skip to content

Commit

Permalink
[BACKPORT]Updated due to #537 and #536.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Mar 19, 2013
1 parent 5a8d0bb commit 5cf2daa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions safe/common/dynamic_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def dynamic_translations():
tr('Tolerance')
tr('Calculate displaced people')
tr('Evacuation percentage')
tr('Distances [km]')

# Post-processing
tr('Gender')
Expand Down
5 changes: 3 additions & 2 deletions safe/impact_functions/volcanic/volcano_building_impact.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def run(self, layers):

# Generate simple impact report
table_body = [question,
TableRow([tr('Buildings'), tr('Total'),
TableRow([tr('Distance [km]'), tr('Total'),
tr('Cumulative')],
header=True),
TableRow([tr('All'), format_int(total_affected), ''])]
Expand All @@ -144,7 +144,8 @@ def run(self, layers):
for name in category_names:
count = categories[name]
cum += count
table_body.append(TableRow([name, format_int(count),
name_km = int(name / 1000) # convert to km
table_body.append(TableRow([name_km, format_int(count),
format_int(cum)]))

table_body.append(TableRow(tr('Map shows buildings affected in '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class VolcanoPolygonHazardPopulation(FunctionProvider):
title = tr('Need evacuation')
target_field = 'population'

parameters = {'R [km]': [3, 5, 10]}
parameters = {'distance [km]': [3, 5, 10]}

def run(self, layers):
"""Risk plugin for flood population evacuation
Expand Down Expand Up @@ -70,7 +70,7 @@ def run(self, layers):

if H.is_point_data:
# Use concentric circles
radii = self.parameters['R [km]']
radii = self.parameters['distance [km]']

centers = H.get_geometry()
attributes = H.get_data()
Expand Down

0 comments on commit 5cf2daa

Please sign in to comment.