safe.engine.interpolation_qgis module

InaSAFE Disaster risk tool by Australian Aid


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

safe.engine.interpolation_qgis.interpolate_polygon_polygon(source, target, wgs84_extent)[source]

Transfer values from source polygon layer to the target polygon layer.

This method will do a spatial join: the output layer will contain all features from target layer, with the addition of attributes of intersecting feature from the source layer. If there is not intersecting source feature, the output layer will still contain the target feature, with null attributes from the source layer.

The intersection test considers only centroids of target features (not the whole polygon geometry).

If more features from source layer intersect a target feature, only the first intersecting source feature will be used.

  • source (QgsVectorLayer) – Source polygon layer
  • target (QgsVectorLayer) – Target polygon layer
  • wgs84_extent (QgsRectangle) – Requested extent for analysis, in WGS84 coordinates

output layer

Return type: