This tool can be used to identify an area of interest within a specified distance of features of interest in a raster data set. For the equivalent operation performed on a vector data set, see the Buffer (Vector) tool. The two tools differ significantly in their implementations.
The Euclidean distance (i.e. straight-line distance) is calculated between each grid cell and the nearest 'target cell' in the input image. Target cells are all non-zero, non-NoData grid cells. Because NoData values in the input image are assigned the NoData value in the output image, the only valid background value in the input image is zero.
The user must specify the input target image, the output image name, the desired buffer size, and the units that the buffer size are measured in. Buffer size units are either map units (e.g. meters) or grid cells.
Buffer grid cells in the output image are assigned the value of the nearest target grid cell in the input image. All non-buffer grid cells are assigned the NoData in the output. Therefore, the output of Buffer is essentially the intersection between the Euclidean allocation image and a Less Than Or Equal To comparison operation on the Euclidean distance image, specifying some maximum distance.
Three temporary images are created during the calculation and should be automatically deleted upon completion. There must be enough room on the computer hard drive to store these temporary images.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.dep"
outputFile = wd + "output.dep"
bufferSize = "500.0"
bufferUnits = "map units"
args = [inputFile, outputFile, bufferSize, bufferUnits]
pluginHost.runPlugin("Buffer", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.dep"
def outputFile = wd + "output.dep"
def bufferSize = "500.0"
def bufferUnits = "grid cells"
String args = [inputFile, outputFile, bufferSize, bufferUnits]
pluginHost.runPlugin("Buffer", args, false)