# An Integrated Algorithm for Extracting Terrain Feature-Point Clusters Based on DEM Data
## 3 Results and Discussion  
### Results of Optimal Threshold Determination  
As described in Section 2.2.1 of this paper, the _LLNV_ and positive terrain constrain method were used to determine the optimal window size of the positive terrain analysis and the optimal threshold of flow accumulation in the runoff simulation, taking the six typical sample areas as an example. Then, the _LLNV_s and potential ridgeline lengths extracted using different parameters were counted, and their relationships are shown using a scatter plot in Figure 6. In Figure 6, the orange stars represent the relationships between the thresholds of flow accumulation in the runoff simulation and the extracted potential ridgelines' lengths. It can be seen that there is a significant exponential relationship between the thresholds of flow accumulation and the potential ridgelines' lengths, and the potential ridgeline length decreases with the increase of the flow accumulation's threshold. The average value of the logistic regression's coefficient of determination (\(R^{2}\)) scores for the six typical sample areas reached 0.96, especially in the Yanchuan and Mizhi counties, where the \(R^{2}\) scores reached 0.99 and 1.00, respectively. Therefore, it can be seen that an appropriate threshold of flow accumulation is of great significance for the potential ridgeline extraction. The blue triangles in Figure 6 represent the relationships between the window sizes of the positive terrain analysis and the corresponding _LLNV_s. It can be seen that there is a significant correlation between the window sizes and the _LLNV_s, and the _LLNV_s showed a trend of increasing first and then decreasing with the increase of the positive terrain analysis's window size. The median value of the quadratic polynomial regression's \(R^{2}\) scores of the quadratic regression for the six typical sample areas reached 0.675. The optimal window sizes of the positive terrain analysis obtained by the proposed method are plotted as blue vertical dashed lines, all located at the extreme value points of the _LLNV_ and adjacent to the fitted curve's symmetry axis. It is noteworthy that the regression's \(R^{2}\) scores for Yanchuan and Mizhi counties show significantly higher values, which may  
Figure 5: Correspondence between peaks and saddles in original and anti-terrain: (**a**) the peaks and saddles in the original terrain; (**b**) the peaks and saddles in the corresponding anti-terrain. be related to the sample area's topographic relief and topographic complexity. To further analyze the relationship between the window size of the positive terrain analysis and the positive terrain, Ningxia County is taken as an example to show the positive terrain's distribution with the window size from 3 \(\times\) 3 to 51 \(\times\) 51 (Figure 7), where Figure 7c shows the distribution of the positive terrain with the optimal analysis window (s = 21) sought by the proposed method. When the analysis window size is small (Figure 7a,b), the positive terrain's distribution is more fragmented, and the flatlands are marked as positive terrain dispersedly, while there are still many positive terrain areas missing from the ridges. With the gradual increase of the analysis window size (Figure 7c-f), the positive terrain is mostly located on the ridges and highlands with a dendritic distribution. Meanwhile, the distribution of positive terrain tends to be stable, and the distribution does not change much with the increase of the window size starting from Figure 7c. Thus, the window size of the positive terrain analysis significantly impacts the distribution of the positive terrain, and the proposed method can obtain a typical analysis window size. To sum up, the proposed method for determining the optimal threshold of the flow accumulation and the window size of the positive terrain analysis has met the expectations.