The impact functions essentially combine spatial data in different formats through a common interpolation library. This essentially allows values from one data set to be assigned to another independent of their types. Given two layers H and E, say, the call:
I = assign_hazard_values_to_exposure_data(H, E, ...)
will produce a new layer with all values from H transferred to E in a manner appropriate for the data types of H and E. Generally, existing values in E will be also be carried over to I. Conceptually, the new layer I represents the values of H interpolated to E.
The function takes a number of optional keyword arguments that pertain to certain type combinations. They are
The following table shows allowed combinations and what interpolation means in each case.
H | E | Methodology | Return value |
---|---|---|---|
Polygon | Point | Clip points to polygon and assign all attributes | Point |
Polygon | Line | N/A | |
Polygon | Polygon | N/A | |
Polygon | Raster | Convert to points and use Polygon-Point algorithm | Point |
Raster | Point | Bilinear or piecewise constant interpolation | Point |
Raster | Line | N/A | |
Raster | Polygon | Convert to centroids and use Raster-Point algorithm | Polygon |
Raster | Raster | Check that rasters are aligned and return E | Raster |