urclib.da_calc

Module for DA specific calculations.

Module Contents

Functions

calc_sum(df_hits)

Perform DA scoring calculation based on field component names.

run_pe_score_da(gdb_ds, index_rasters, index_mask, ...)

Calculate the PE score for DA values using the URC method.

urclib.da_calc.calc_sum(df_hits)

Perform DA scoring calculation based on field component names.

Parameters:

df_hits (pandas.DataFrame) – The initial values for any components counted.

Returns:

The results of the calculations, in tabular form.

Return type:

pandas.DataFrame

urclib.da_calc.run_pe_score_da(gdb_ds, index_rasters, index_mask, out_workspace, rasters_only=False, clipping_mask=None, post_prog=None)

Calculate the PE score for DA values using the URC method.

Parameters:
  • gdb_ds (gdal.Dataset) – The Database/dataset containing the vector layers representing the components to include.

  • index_rasters (RasterGroup) – The raster representing the indexes generated for the grid.

  • index_mask (numpy.ndarray) – Raw values representing the cells to include or exclude from the analysis.

  • out_workspace (common_utils.UrcWorkspace) – The container for all output filepaths.

  • rasters_only (bool) – If true, skip analysis after all intermediate rasters are written. Only has an effect if out_workspace has ‘raster_dir’ defined.

  • post_prog (function,optional) – Optional function to deploy for updating incremental progress feedback. function should expect a single integer as its argument, in the range of [0,100].

  • clipping_mask (gdal.Dataset,optional) – Clipping mask to apply, if any.