Simplify
Steps
- After clicking the Simplify button in the vector editor, the settings dock will appear on the right side of the software.
Simplify Settings Interface
Simplification Algorithm Selection
Distance: Simplify the curve by thinning it based on a threshold distance between vertices, generating a simplified polyline.
Snap to Grid:
Grid Definition: First, define a grid size (grid size). This grid size determines the width and height of each grid cell. The grid size is typically a square, and its edge length determines the degree of simplification. A smaller grid size results in less simplification, while a larger grid size results in more simplification.
Coordinate Mapping: Map the coordinates of each vertex of the input spatial data (such as polygons or polylines) to the nearest grid cell center. This means that each vertex's coordinates will be adjusted to the nearest grid cell center position.
Coordinate Rounding: The fractional part of each vertex coordinate is discarded, and the coordinates are multiplied by the grid size, resulting in an integer multiple position. For example, if the grid size is 10 meters, the coordinates (123.45, 678.90) will be rounded to (120, 670), which is the nearest grid cell center position.
Redraw Geometry: Redraw the geometry (polygon or polyline) using the adjusted vertex coordinates. If adjacent vertices map to the same grid cell center, they will be merged into a single vertex.
Result: The final result is a simplified geometry with significantly fewer vertices, but the overall shape still retains the general outline of the original geometry.
Area (Visvalingam):
Calculate Triangle Areas: For each pair of adjacent edges in a polygon, calculate the area of the triangle formed by these two edges. These triangles are formed by each edge and its corresponding vertex.
Find the Smallest Area Triangle: Find the triangle with the smallest area among all these triangles. The vertex of this smallest area triangle is considered "unimportant" because its removal has the least impact on the overall polygon area.
Remove Vertex: Remove the vertex of the smallest area triangle, connecting the two edges directly, thus reducing the number of vertices in the polygon.
Repeat Process: After removing the vertex, repeat the process, continuing to find the new smallest area triangle and remove its vertex until a predefined simplification threshold is reached or no more vertices can be removed.
Stopping Condition: The simplification process can stop based on user-defined parameters, such as reaching a certain number of vertices or when the removal of a vertex would cause the area change to exceed a certain threshold.
Distance (Douglas-Peucker):
Initial Setup: Input: a line or contour composed of a series of vertices. Output: a simplified sequence of vertices. Parameter: tolerance value (tolerance), which represents the maximum allowed deviation distance.
Determine Initial Boundaries: Select the first and last vertices of the line segment as the initial boundary points. These points are always retained.
Find the Farthest Point: Calculate the distance from all other vertices to the line segment formed by these two boundary points. Find the vertex that is farthest from the line segment and record its distance (d).
Determine Whether to Retain: If (d) is greater than the set tolerance value, add this farthest point to the result set and use this point as a new boundary point, recursively processing the sub-segments on both sides. If (d) is less than or equal to the tolerance value, ignore this point and continue processing the remaining segments.
Recursive Processing: Repeat the process for each new sub-segment until all sub-segments have been processed.
Combine Results: The final result is a new line segment composed of all the retained vertices.
Select the simplification algorithm. The simplification effects are shown in the following images.
Distance Simplification
Snap to Grid Simplification
Area (Visvalingam) Simplification
Distance (Douglas-Peucker) Simplification
Set the simplification threshold parameters until the red polyline preview meets the expected effect.
- Click the "OK" button to generate the simplified vector.