Converts a raster dataset to a shapefile of the Polygon shapetype. The user must specify the name of a raster file and the name of the output shapefile. Polygon boundaries will correspond with grid cell edges. All grid cells containing positive, non-zero values will be considered part of polygon. The shapefile's attribute table will contain a field called 'VALUE' that will contain the cell value for each polygon feature. This tool is the complement of the Vector Polygons To Raster tool. The edges of polygons in the output vector file will follow the jagged pixel boundaries. If you require a more cartographically pleasing smooth boundary, use the Smooth tool. This tool does not currently handle the special case of interior holes within polygons, e.g. islands within a lake.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.dep"
outputFile = wd + "output.dep"
args = [inputFile, outputFile]
pluginHost.runPlugin("RasterToVectorPolygons", 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"
String[] args = [inputFile, outputFile]
pluginHost.runPlugin("RasterToVectorPolygons", args, false)