Calculate_bal¶
calculate_bal.py¶
calculate_bal
- essential part of calculating the
bushfire attack level (BAL)
This module includes algorithms that are used to calculate BAL as per Method 1 in the Australian Standard AS 3959 (2009) – Construction of buildings in bushfire-prone areas.
moduleauthor: | Tina Yang <tina.yang@ga.gov.au> |
---|
-
calculate_bal.
bal_cal
(veg_class, slope, aspect, fdi)[source]¶ Calculate the BAL based on the classified vegetation and the combined slope and vegetation according to an appropriate table in AS 3959 (2009) to determine the bushfire attack level (BAL).
Parameters: - veg_class – file the input classified vegetation
- slope – file the input slope
- aspect – file the input aspect
- fdi – int the input FDI value
-
calculate_bal.
bal_esti
(veg, dist, slope, fdi)[source]¶ Calculate the BAL based on the vegetation class, slope degree and horizontal distance from the point of interest (POI).
Parameters: - veg – float the vegetation type
- dist – float the horizontal distance from POI
- slope – float the slope value
- fdi – int the input FDI value
Returns: float the output BAL value for this neighbour point regards to the POI
-
calculate_bal.
convo
(a_dir, veg_data, slope_data, aspect_data, pixel_width, fdi)[source]¶ Find the maximum BAL for the point of interest in one direction by assessing all neighbours’ BAL values in that direction (up to 100 metres).
Parameters: - a_dir – string the specific direction
- veg_data –
numpy.ndarray
the classified vegetation values - slope_data –
numpy.ndarray
the slope values - aspect_data –
numpy.ndarray
the aspect values - pixel_width – float the pixel width of the classified vegetation
- fdi – int the input FDI value
Returns: numpy.ndarray
the output BAL values
-
calculate_bal.
find_dist_class
(dist, dist_limit)[source]¶ Decide the BAL class based on the input distance and the distance upper-limit for each BAL class.
Parameters: - dist – float the horizontal distance from POI
- dist_limit – list the upper-limit for each BAL class
Returns: int the distance class defined in bal_database.py
-
calculate_bal.
get_max_bal
(bal_list)[source]¶ get the maximum bal value of all 8 directions.
Parameters: bal_list – list of arrays the bal value for each of 8 directions Returns: numpy.ndarray
the maximum bal value of 8 directions
-
calculate_bal.
get_slope_in_aspect
(slope_data, aspect_data, rows, cols, aspect_value)[source]¶ Get the slope data in a specific aspect.
Parameters: - slope_data –
numpy.ndarray
the slope values - aspect_data –
numpy.ndarray
the aspect values - rows – int the row number of the slope_data
- cols – int the column number of the slope_data
- aspect_value – int the aspect value
Returns: numpy.ndarray
the slope data in an aspect- slope_data –