Function Description
Raster Thinning refers to preprocessing Raster Data before vectorization to improve the speed and accuracy of vectorization, which is only applicable to the process of converting Raster Data to vector line data. The Raster Thinning feature supports both Raster Data and Image Data. The Raster to Vector operation also provides the Raster Thinning function, that is, when the Grid/Image data is vectorized, the thinning processing function can be realized. Refer to the Raster to Vector for the function of the Raster to Vector.
Raster Data thinning process can reduce the number of pixels used to identify Polyline in Raster Data, thereby improving the speed and accuracy of vectorization. Generally, it is used as a preprocessing operation before the grid line is converted to Vector Data, which can make the conversion effect better. For example, a scanned contour map (Image Data) may use 5 or 6 pixels to display the width of a contour line. After refinement, the width of the contour line may be displayed with only one pixel. Raster Thinning Raster Thinning
![]() | ![]() |
Before | After |
Function entrance
- Click Spatial Analysis tab-> Raster Analysis group-> Vector-Raster Conversion-> Raster Thinning.
- Toolbox-> Raster Analysis-> Vector-Raster Conversion-> Raster Thinning. (iDesktopX)
Parameter Description
- Source Data: Set the source data to be processed, and select the Datasource where Raster Data is located and the Raster Dataset to be operated.
- Set the parameters for Raster Thinning.
- No Value: The meaning of no value is different due to different Data Type selections, which are described as follows:
- Raster Data: The value in the Result Dataset is null, that is, if the pixel value after Raster Thinning is null, it will be assigned as -9999. Pixels with no value are not involved in the calculation during Raster Thinning. When a line is represented by multiple pixels, only one pixel is used for display after thinning, and other pixel values are filled with this value. When using iDesktop, the user can click
the button to pick the value of an open Raster Dataset and set it to "No Value", or the user can directly enter a grid value of an open Raster Dataset.
- Image Data: The specified Image Data pixel value is regarded as having no value. Pixels set as having no value do not participate in calculation and will not be converted during Raster Thinning. The default value of No Value is related to the Pixel Format of the Image Dataset: the default value of No Value is the maximum value of the range of data values corresponding to the Pixel Format. If the Pixel Format of Image Data is 24-bit true color, and the Dataset can represent 16777216 integer values from 0 to 16777215, the default value of none is the 16777215. When using iDesktop, the user can click the Pick button to pick the value of an open Raster Dataset and set it to "No Value." The user can also directly enter a grid value for an open Raster Dataset.
- Raster Data: The value in the Result Dataset is null, that is, if the pixel value after Raster Thinning is null, it will be assigned as -9999. Pixels with no value are not involved in the calculation during Raster Thinning. When a line is represented by multiple pixels, only one pixel is used for display after thinning, and other pixel values are filled with this value. When using iDesktop, the user can click
- Tolerance:
- Grid tolerance: Set the tolerance of grid no-value data. If the no-value data is set to R and the tolerance value is set to a, the range of no-value data is R-a, R + a.
- Image tolerance (iDesktop): Set the tolerance of image no-value data. If the no-value data is set to R and the tolerance value is set to a, the range of no-value data is r-a, R + a.
- Image tolerance (iDesktopX): Set the RGB value of the no-value data tolerance of the image. Assuming that the 8-bit unsigned image is thinned, set 0 as the no-value. The RGB of the no-value pixel with the pixel value of 0 is (250, 250, 050). If the image Tolerance Settings is (R: 2, G: 2, B: 3), the pixels in the range of RGB (248, 248, 252)-RGB (252, 252, 253) are considered to have no value.
- Result Data: Set the Result Data parameter, and select the Datasource to save the processed result and the Resulting dataset name.
Application example
Open Exercise Data & gt; The Terrain "Datasource under the" RasterAnalysis "folder, where the Raster ForLine data is rasterized by contours, after setting the Raster Thinning Parameters, the result is as shown in the following figure.
Figure: Thin Raster Result comparison Precautions
- The tolerance for
- no value is the user-specified tolerance for the value of no value, regardless of the original no value in the grid.
- It is recommended that the user click the Pick button to set the value of the opened Raster Dataset to "No Value". If the value of No Value entered by the user is a value that does not exist in the Dataset pixel value, the Calculate Result will be incorrect, or the Raster Thinning cannot be performed.
- No Value: The meaning of no value is different due to different Data Type selections, which are described as follows: