At present, the Smooth Line methods provided by SuperMap UGC (Universal GIS Class) series products for line and Region Dataset mainly include B-Spline and angle grinding method.
1. Use B-spline method for Smooth Line
Smoothness is a parameter that controls smoothness. In the B-spline method, it can also be understood as the number of segments separated by the insertion point between two nodes on a line segment.
The shape of the original curve should be kept as much as possible when performing Smooth Line on a non-closed line segment. In order to achieve this goal, the usual method is to keep the position of the first and last endpoints unchanged and increase the number of segments after the insertion point of the first and last line segments (usually twice the Smoothness).
Smoothness is set. A value of Is no less than 2 is valid. The higher the value, the more nodes and the smoother the line or face object boundary. The suggested range of values is 2,10.
There are two ways to calculate the number of interpolation points in B-spline method: closed line and non-closed line.
- If the segment is closed, the final number of nodes = (number of control points) * Smoothness.
- If the segment is not closed, the final number of nodes = (number of control points + 1) * Smoothness + 1.
- Control points can be understood as the actual number of nodes on the smooth front object.
- Shown below is the insertion point when the closed line is smoothed. (Note that the actual number of points for the closed curve is one less than shown because the positions of the first and last points coincide.) Smoothness is set to 2 when performing Smooth Line
on a closed line, that is, 1 point is inserted between each segment to separate it into 2 segments to achieve smoothness.
3 points beforesmoothing and 6 points after smoothing.
Smoothness is set to 10 when Smooth Line is performedon a closed line, and the smoothing effect is as follows.
- The following shows the insertion point of a non-closed line when it is smoothed.
Smoothness is set to 2 when performing Smooth Line on an unclosed line, that is, 1 point is inserted between each segment in the middle to divide it into 2 segments to achieve smoothness, and the number of segments at the beginning and end is divided into 4 segments (3 points are inserted).
6 points before smoothing and 15 points after smoothing.
Smoothness is set to 10 for an unclosed line, and the smoothing effect is as follows.
2. Smooth Line by angle grinding method
The angle grinding method is a smoothing method with relatively simple operation and fast processing speed, but the effect is relatively limited. Its operation process is mainly to insert two points into the line segment between two nodes, that is, to trisect the original line segment, and then to connect the adjacent insertion points on both sides of the original node, so as to erase the angle where the node is located in the original Geometry, and to complete more than one process is a grinding process.
Smoothness refers to the number of times the corners are ground. The higher the Smoothness value, the more insertion points in the resulting object, and the closer the result is to smoothness.
- The following is the process of using the angle grinding method to perform Smooth Line on a closed quadrilateral. The Smoothness is 2, that is, the angle grinding is performed twice.
- When the non-closed line is subject to smooth line grinding, the processing of the middle line segment and the node is the same as above, and the positions of the first and last endpoints are kept unchanged.