utilities

These are tools or functions used to support the main computation.

__init__.py

value_lookup.py

value_lookup - helpful dictionaries for calculating the bushfire attack level (BAL)


These dictionaries are helpful to adapt the algorithm spatially to Method 1 in AS 3959 (2009).

moduleauthor:Tina Yang <tina.yang@ga.gov.au>

bal_database.py

bal_database - relevant dictionaries for calculating the bushfire attack level (BAL)


These dictionaries are translated from tables from 2.4.2 to 2.4.5 in AS 3959 (2009) to determine the BAL for an area of interest within Australia.

moduleauthor:Tina Yang <tina.yang@ga.gov.au>

sa_tools.py

sa_tools - some support functions replacing spatial analyst


This module includes algorithms that are used to replace spatial analyst functions such as ExtractByMask, Reclassify, Slope and Aspect used within this package.

moduleauthor:Tina Yang <tina.yang@ga.gov.au>
sa_tools.cal_slope_aspect(dem, slope_fname, aspect_fname)[source]

Calculate the slope from the input dem

Parameters:
  • demfile the input dem
  • slope_fnamefile the output slope
  • aspect_fnamefile the output aspect
sa_tools.clip_array(data, x_left, y_upper, pixelwidth, pixelheight, extent)[source]

Return the clipped area of the input array according to an sub-extent

Parameters:
  • datanumpy.ndarray the input array
  • x_leftfloat the left-most x projected coordinate
  • y_upperfloat the upper-most y projected coordinate
  • pixelwidthfloat the pixel width
  • pixelheightfloat the pixel height
  • extenttuple the clipping extent
Returns:

numpy.ndarray the clipped array

sa_tools.extract_by_mask(image_fname, extent_file, out_fname)[source]

Extract a raster using a feature (shape) file

Parameters:
  • image_fnamefile the input raster
  • extent_filefile the input extent feature file
Returns:

file the output raster

sa_tools.reclassify(image_fname, remap, out_fname)[source]

Reclassify the raster as per the input remap

Parameters:
  • image_fnamefile the input raster
  • remapstr the info of remap
Returns:

file the output raster