Vector attribute gridding

This tool interpolates the spatial pattern of average values of an attribute of vector features onto a raster grid. The tool can be used to answer the question, of the vector features (points, lines, or polygons) within the a local neighbourhood of a specified radius (search distance), what is the average value of some attribute (input value field)? This can be quite a useful operation for visualizing spatial patterns. The user must specify the name of the input vector file and the attribute to grid, which must be numerical. The user must also provide either the grid resolution of the output surface or the name of an existing raster file from which to derive the geographical extent and grid resolution. If a cell size (grid resolution) is specified, the output raster will derive its geographical extent from that of the input vector file. Each grid cell in the output raster image will contain the average value of the features contained (or partially contained) within circular neighbourhood centered on the grid cell. If no features are contained within the neighbourhood, the NoData value will be assigned to the grid cell. This tool operates in parallel and will experience significantly faster processing when run using a system with a multi-core processor.

See Also:

Scripting:

The following is an example of a Python script using this tool:

wd = pluginHost.getWorkingDirectory()
inputData = wd + "input.shp" + ";" + "DATA_FIELD"
cellSize = "10.0"
baseFile = "not specified"
searchDistance = "100.0"
outputFile = wd + "output.dep"
args = [inputData, cellSize, baseFile, searchDistance, outputFile]
pluginHost.runPlugin("VectorAttributeGridding", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputData = wd + "input.shp" + ";" + "DATA_FIELD"
def cellSize = "not specified"
def baseFile = wd + "basefile.dep"
def searchDistance = "100.0"
def outputFile = wd + "output.dep"
String[] args = [inputData, cellSize, baseFile, searchDistance, outputFile]
pluginHost.runPlugin("VectorAttributeGridding", args, false)

Credits: