The Raster to segments operation extracts segments from the boundaries of mapping units in a raster map.
The segments in the output map are derived from the boundaries of areas of pixels that have the same class name or ID in the input raster map. You can choose to create segments:
For more information on constructing areas of 4 or 8-connected pixels, see Area numbering : functionality.
There are two possibilities to assign names to the extracted segments:
Furthermore, you can specify whether or not to smooth the output segments.
Examples:
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 |
Output map 8-connected |
|
|
|
|
Output map 4-connected |
Output map 8-connected |
|
|
Using 4- and 8-connectivity, the appearance of the output map looks the same, however in the case of 4-connectivity the output map has more segments. This is because only horizontal and vertical neighbours were evaluated to construct segments from the boundaries of the mapping units. In the case of 8-connected, horizontal, vertical and diagonal neighbours were used to construct segments. Note that in the output map the two highlighted segments (dark gray and dashed) 'touch' another segment (black) in the central part of the map without a node.
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 segments 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 segments operation.
Input map requirements:
When you use the Raster to Segments 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 operation creates a new domain which is stored by the output map (internal domain).
The output segment map uses the same coordinate system as the georeference of the input raster map. The coordinate boundaries for the segment map are the boundaries of this georeference.
Attribute table for output map:
When the Unique Names option is used, an attribute table will be automatically created for the output map. The table will obtain the same name as the output map. The table will contain the new IDs, the names of the mapping units to the right and to the left of each extracted segment and the length of each extracted segment.
Tips:
See also:
Raster to segments : dialog box