This tool can be used to measure the length of the perimeter of polygon features in a raster or vector layer. If a raster image is input, the user must specify the name of the output raster file, which will be raster layer containing the input features assigned the perimeter length. The user may also optionally choose to output text data if a raster file is input. Raster-based perimeter estimation uses the accurate, anti-aliasing algorithm of Prashker (2009).

If a vector file (shapefile) is input, the output data will be displayed as a new field (PERIMETER) in the database file (.dbf). There is also no need to specify an output raster file when a vector is input.

See Also:


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

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "polygons.shp" # vector input
outputFile = "" # ignored for vector input
textOutput = "false" # also ignored
args = [inputFile, outputFile, textOutput]
pluginHost.runPlugin("Perimeter", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "polygons.dep" // raster input
def outputFile = wd + "output.dep"
def textOutput = "true"
String[] args = [inputFile, outputFile, textOutput]
pluginHost.runPlugin("Perimeter", args, False)