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 will be the name for new attribute in the result containing the hazard level. If None (default) the name of hazard layer is used.
If hazard layer is polygon and exposure layer raster, this will be the name of the new attribute containing the raster value at each point.
If hazard and exposure layers are both of type vector, this attribute is ignored.
If hazard and exposure layers are both of type raster, this attribute is ignored.
- 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.
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.
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.
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
Tag polygons by raster values
This module forms part of the InaSAFE tool.