Raster to polygons


The Raster to Polygons operation extracts polygons from units in a raster map. The output polygon map uses the same domain as the input raster map, i.e. the class names or IDs in the input raster map will also be used for the polygons in the output polygon map. No polygons are created for pixels with the undefined value.

The polygons in the output map are derived from areas of pixels in the input raster map:

You can choose to create polygons:

For more information on constructing areas of 4 or 8-connected pixels, see Area numbering : functionality.

Furthermore, you can specify whether or not to smooth the boundaries of the output polygons.

The Raster to Polygons operation attempts to create polygons for neighbouring pixels which have the same class name or ID or exactly the same value. In an input map which uses a class or ID domain, the areas with a certain class name or ID are clearly distinct, thus, it is rather simple to find the areas. In the dialog box of this operation, you can therefore only select class or ID maps. On the command line, you can also use value maps or images as input. However, in a value map or an image, there are usually no distinct areas with exactly the same value; the values of neighbouring pixels may be similar but are usually not exactly the same. As the operation attempts to find areas where neighbouring pixels have exactly the same value, the resulting output map will usually contain very many areas; these areas may consist of individual pixels or of small groups of a few pixels. To make polygons of a value raster map or an image, it is advised to first use the Slicing operation; then, you can use the output map of the Slicing operation in the Raster to Polygons operation.


The effect of using 4 or 8-connected pixels and smoothing or no smoothing is illustrated in the figures below.


Input map:



Output map 4-connected
no smoothing:

Output map 8-connected
no smoothing:



Output map 4-connected
with smoothing:

Output map 8-connected
with smoothing:

The result of this operation depends on the homogeneity of the raster map and the pixel size compared to the size of the mapping units. It is advised to only use this operation on rather homogeneous raster maps that consist of areas with a considerable number of pixels. When you want to extract for instance polygons from a raster map which is the result of the Classify operation, it may be better to first run the majority filter on that raster map to homogenize the classification results and then perform the Raster to polygons operation.

When the input raster map has an attribute table or when the domain of the input raster map has an attribute table, the Raster to polygons operation automatically links this attribute table to the output polygon map.

Input map requirements:

When you use the Raster to Polygons operation through the dialog box, you can use for the input raster map a map with a class, ID or Bool domain. On the command line, you can use any type of input map.

The input raster map must have a georeference which is not georeference None.

Domain and coordinate system of output map:

The output polygon map uses the same domain as the input raster map.

The output polygon map uses the same coordinate system as the georeference of the input raster map. The coordinate boundaries for the polygon map are the boundaries of this georeference.

See also: