urclib.ds_calc
Module for DS specific calculations.
Module Contents
Functions
|
Create interpolated rasters for DS Datasets. |
|
Calculate the PE score for DS values using the URC method. |
- urclib.ds_calc.get_ds_distances(src_rasters, cache_dir=None, mask=None)
Create interpolated rasters for DS Datasets.
- Parameters:
src_rasters (RasterGroup) – The rasters to sample distances from.
cache_dir (str,optional) – location to write out new rasters, if provided. Otherwise, rasters are kept in memory.
mask (numpy.ndarray,optional) – No data mask to apply.
- Returns:
The newly generated distance Rasters.
- Return type:
- urclib.ds_calc.run_pe_score_ds(gdb_ds, index_rasters, index_mask, out_workspace, rasters_only=False, clipping_mask=None, post_prog=None)
Calculate the PE score for DS 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.
clipping_mask (gdal.Dataset,optional) – Clipping mask to apply, if any.
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].