Interpolation from hazard to exposure layers.
Provides interpolation functionality to assign values from one layer instance to another irrespective of layer types.
Assign hazard values to exposure data
This is the high level wrapper around interpolation functions for different combinations of data types.
hazard: Layer representing the hazard levels
exposure: Layer representing the exposure data
If None (default) the name of the exposure layer is used for the returned layer.
If hazard layer is of type raster, this is the name for new attribute in the result containing the hazard level. If None (default) the name of hazard is used. If hazard layer is of type vector, it is the name of the attribute to transfer from the hazard layer into the result. If None (default) all attributes are transferred.
- mode:
Interpolation mode for raster to point interpolation only
Note:
Admissible combinations of input layer types are
Exposure | Raster Polygon Line PointPolygon | Y Y Y Y Raster | Y Y Y Y
with the following methodologies used:
- Polygon-Point: Clip points to polygon and assign polygon attributes
- to them.
Polygon-Line: * Not Implemented * Polygon-Polygon: * Not Implemented * Polygon-Raster: Convert raster to points, clip to polygon,
assign values and return point data
- Raster-Point: Bilinear (or constant) interpolation as currently
- implemented
Raster-Line: * Not Implemented * Raster-Polygon: Calculate centroids and use Raster - Point algorithm Raster-Raster: Exposure raster is returned as is
The data type of the resulting layer depends on the combination of input types as follows:
Polygon-Point: Point data Polygon-Line: N/A Polygon-Polygon: N/A Polygon-Raster: Point data Raster-Point: Point data Raster-Line: N/A Raster-Polygon: Polygon data Raster-Raster: Raster data
Check inputs and establish default values
Interpolate from polygon vector layer to line vector data
source: Vector data set (polygon)
target: Vector data set (lines)
If None the name of target is used for the returned layer.
If None (default) the name of source is used
Attributes are combined from polygon they fall into and line that was clipped.
Lines not in any polygon are ignored.
Interpolate from polygon vector layer to point vector data
source: Vector data set (polygon)
target: Vector data set (points)
If None the name of target is used for the returned layer.
If None (default) the name of source is used
Interpolate from polygon layer to raster data
source: Polygon data set
target: Raster data set
If None the name of source is used for the returned layer.
If None (default) the name of layer target is used
Interpolate from polygon vector layer to vector data
source: Vector data set (polygon)
target: Vector data set (points or polygons) - TBA also lines
If None the name of target is used for the returned layer.
If None (default) the name of source is used
Check for alignment and returns target layer as is
Interpolate from raster layer to vector data
source: Raster data set (grid)
target: Vector data set (points or polygons)
If None the name of V is used for the returned layer.
If None (default) the name of R is used
Note: If target geometry is polygon, data will be interpolated to its centroids and the output is a point data set.
Interpolate from raster layer to point data
source: Raster data set (grid)
target: Vector data set (points)
If None the name of target is used for the returned layer.
If None (default) the name of layer source is used
from grid to points should be bilinear or piecewise constant
Create circular polygon in geographic coordinates
centers: list of (longitude, latitude) radii: desired approximate radii in meters (must be
monotonically ascending).
Can be either one number or list of numbers attributes (optional): Attributes for each center
This module forms part of the InaSAFE tool.