Line object resampling refers to resampling the boundary lines of lines or regions, removing some nodes on the geometry according to certain rules, while trying to maintain the shape of the geometry.
Currently, the resampling methods provided for line objects in vector datasets include Blend and Douglas-Peucker.
1. Resampling Using Blend
- Below, we use a polyline with 6 nodes as shown in the figure to illustrate the calculation process of the blend method:

- As shown in the left figure below, draw a perpendicular line to segment 12 at node 2. On this perpendicular line, select points A and B at a distance of "resampling distance m" from node 2. Connect node 1 to points A and B respectively and extend to form the resampling region (the pink region in the left figure). Determine whether node 3 is within this region. If it is, delete node 2; otherwise, retain it. Since node 3 is within the resampling region, node 2 is deleted, and the polyline becomes the shape shown in the right figure below.

- Then, judge node 3 using the method in step 1. As shown in the figure below, it is found that node 4 is not within the resampling region (green region), so node 3 is retained.

- Continue judging the remaining nodes, and finally obtain the resample result as shown in the figure below.

2. Resampling Using Douglas-Peucker
Below, we still use the polyline with 6 nodes from the blend method to illustrate the calculation process of Douglas-Peucker: As shown in the figure below, connect the start and end nodes of the polyline to obtain a line. The maximum distance from other nodes to this line is d. If d > m (resampling tolerance), the node corresponding to d is retained. Using this node as a division point, divide the original line object into two parts, and continue using this method for resampling until all divided lines cannot be resampled further (i.e., they contain only two nodes); otherwise, all middle points are deleted.
- In the figure below, obviously d > m, so node 2 is retained. The original line object is divided into two parts, containing nodes 1, 2 and nodes 2, 3, 4, 5, 6 respectively.

- As shown in the left figure below, the line composed of nodes 1 and 2 cannot be simplified further. Repeat the previous step for the line composed of nodes 2, 3, 4, 5, 6. Since d < m, all nodes between nodes 2 and 6 are deleted, leaving nodes 2 and 6, so it cannot be simplified further, thus obtaining the final resampling result as shown in the right figure below.
