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_classfile the input classified vegetation
  • slopefile the input slope
  • aspectfile the input aspect
  • fdiint 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:
  • vegfloat the vegetation type
  • distfloat the horizontal distance from POI
  • slopefloat the slope value
  • fdiint 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_dirstring the specific direction
  • veg_datanumpy.ndarray the classified vegetation values
  • slope_datanumpy.ndarray the slope values
  • aspect_datanumpy.ndarray the aspect values
  • pixel_widthfloat the pixel width of the classified vegetation
  • fdiint 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:
  • distfloat the horizontal distance from POI
  • dist_limitlist 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_listlist 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_datanumpy.ndarray the slope values
  • aspect_datanumpy.ndarray the aspect values
  • rowsint the row number of the slope_data
  • colsint the column number of the slope_data
  • aspect_valueint the aspect value
Returns:

numpy.ndarray the slope data in an aspect