Slope intelligent layered modeling method based on inclined terrain

By improving the K-means clustering algorithm and using multi-step optimization, the accuracy and efficiency issues of slope analysis in complex terrain are solved, achieving high-precision slope stratification, which is applicable to fields such as geographic information systems and environmental monitoring.

CN120953528APending Publication Date: 2025-11-14TIANYUAN CONSTR GROUP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511037569.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing slope analysis methods suffer from high computational complexity and low accuracy in complex terrain, and cannot effectively handle the nonlinearity and local irregularity of slope changes, resulting in the inability to obtain high-precision slope stratification information.

Method used

A slope intelligent stratification modeling method based on sloping terrain is adopted. Through an improved K-means clustering algorithm and multi-step optimization processing, including slope calculation, preprocessing, clustering, denoising, smoothing and fine boundary processing, high-precision DEM data is obtained by combining remote sensing technology to achieve accurate slope stratification.

Benefits of technology

It significantly improves the accuracy and processing efficiency of slope stratification, is suitable for large-scale terrain data, can accurately reflect slope changes in complex terrain, and is applicable to fields such as geographic information systems, urban planning, and environmental monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953528A_ABST
    Figure CN120953528A_ABST
Patent Text Reader

Abstract

The invention discloses a slope intelligent layered modeling method based on inclined terrain, and relates to the fields of geographic information systems (GIS), remote sensing technologies and digital elevation model (DEM) analysis. The method comprises the following steps: acquiring digital elevation model (DEM) data; calculating the gradient and the slope direction; performing gradient layering by using an intelligent layering algorithm; a modeling result is optimized; and visually outputting a result. By accurately calculating the gradient and the gradient direction and combining the K-means clustering optimization algorithm, the gradient change of the complex terrain can be accurately reflected, the method is particularly suitable for modeling of inclined terrains, the gradient layering precision is improved, the gradient change of the complex terrain can be effectively processed, and the modeling efficiency is improved. The method has the advantages that the method is simple, the processing efficiency of large-scale topographic data is optimized, the calculation complexity is obviously reduced, and the method is high in flexibility, capable of adjusting the number and the threshold value of the gradient layers according to actual requirements and suitable for different application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of Geographic Information Systems (GIS), remote sensing technology, and Digital Elevation Model (DEM) analysis, specifically to an intelligent stratified slope modeling method based on sloping terrain. Background Technology

[0002] With the rapid development of remote sensing technology and GIS, slope analysis has become an indispensable part of topographic research. Based on digital elevation models (DEMs), slope is an important parameter describing the degree of ground inclination and is often used in terrain classification, land planning, and natural disaster prediction. However, existing slope analysis methods often suffer from high computational complexity and low accuracy when calculating slopes in complex terrains (such as mountains and hills). Traditional slope calculation methods typically calculate slope and aspect based on the elevation difference between adjacent pixels, but this is not satisfactory for modeling complex terrains, especially sloping terrain. In particular, existing methods cannot effectively handle the nonlinearity and local irregularities of slope changes in terrain, resulting in the inability to obtain high-precision slope stratification information. Moreover, traditional methods have poor processing capabilities for large-scale terrain data, with slow calculation speed and low efficiency. Therefore, there is an urgent need for a new method that can efficiently and accurately perform intelligent stratified modeling of slopes in complex terrains to meet the needs of different fields of terrain analysis. Summary of the Invention

[0003] To address the shortcomings of existing technologies, the present invention aims to provide an intelligent stratified slope modeling method based on sloping terrain. This method can accurately calculate and analyze the slope of terrain in layers, and is particularly effective in handling the nonlinear characteristics of slope changes in sloping terrain. Through improved algorithms, the present invention can significantly improve stratification accuracy while reducing computational complexity and processing time, making it suitable for terrain data analysis in large-scale areas.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0005] A slope intelligent hierarchical modeling method based on sloping terrain, comprising the following steps:

[0006] Step S1: Obtain Digital Elevation Model (DEM) data;

[0007] Step S2: Based on the digital elevation model (DEM) data, calculate the slope θ(i,j) and aspect of each grid cell. Used to describe the slope changes and orientation of local areas of the ground;

[0008] Step S3: Divide the calculated slope value θ(i,j) into several preset slope intervals, and then optimize the slope data by layering based on the K-means clustering algorithm;

[0009] Step S4: Perform post-optimization processing on the slope intervals after optimization and stratification. The optimization process includes, but is not limited to, denoising, smoothing, and fine stratification.

[0010] Step S5: The optimized stratification results are presented in a graphical form, outputting the specific regional distribution and statistical data of each slope layer.

[0011] Furthermore, step S1 uses remote sensing technology or obtains digital elevation model (DEM) data of the target area through an existing geographic information platform; the digital elevation model (DEM) data represents the elevation value of each point on the ground, and is represented in matrix form Z(i,j), where i and j are the row index and column index in the matrix, respectively, and Z(i,j) represents the elevation value of that point;

[0012] The remote sensing technologies include, but are not limited to, satellite imagery, UAV images, and lidar.

[0013] Furthermore, in step S2, the slope is a measure of the degree of ground change, and the slope aspect is the direction of ground change. Based on the DEM data, the slope θ(i,j) and slope aspect φ(i,j) of each grid cell are calculated using the difference method.

[0014] The slope θ(i,j) is obtained by calculating the change in elevation of adjacent grid cells, and the gradient of the elevation data in the x and y directions can be calculated by the difference formula.

[0015] The slope Indicates the direction of the slope;

[0016] This method yields the slope and aspect of each grid cell, forming the basic slope characteristics of the terrain.

[0017] Furthermore, in step S3, after calculating the slope and aspect information, an improved K-means clustering algorithm is used to stratify the slope. First, the calculated slope value θ(i,j) is divided into several preset slope intervals [θ1,θ2,...,θ]. n Then, K-means clustering algorithm is applied to each interval to obtain regions with similar slope values;

[0018] The improved K-means clustering algorithm uses the elbow method combined with the silhouette coefficient method to determine the optimal number of clusters K. For each initial interval, by calculating the sum of squared errors (SSE) and silhouette coefficients under different K values, the K value with the largest silhouette coefficient and the SSE change rate within a certain threshold is selected as the optimal number of clusters for that interval. The range of K values ​​is controlled between 2 and 5.

[0019] A weighting factor is introduced to weight the slope data according to the slope aspect. For areas where the slope aspect change rate is greater than the preset change rate threshold, the weight of that area is increased.

[0020] The goal of the improved K-means clustering is to minimize the distance between the data points in each category and the category center. The optimization goal of K-means clustering is to minimize the objective function by continuously adjusting the category centers until convergence, and finally obtain the slope stratification result.

[0021] The mathematical expression of the objective function J is as follows:

[0022]

[0023] in, For the i-th data point belonging to the k-th class, For the corresponding weighting factor, μ k For the center of class k, N k Let be the number of data points in the k-th class.

[0024] Furthermore, in step S4, the optimization process includes, but is not limited to, denoising, smoothing, and refining boundary steps;

[0025] The denoising process employs a morphological filtering algorithm, using a 3×3 structuring element to perform erosion and dilation operations on the layered results.

[0026] The smoothing process employs a Gaussian smoothing algorithm, with a smoothing window set to 5×5 and a standard deviation set to 1.0-1.5.

[0027] The refined boundary is achieved using an edge detection algorithm and the Canny operator.

[0028] Furthermore, the stratification results are presented in a graphical form, showing the regional division of slope stratification;

[0029] The specific regional distribution and statistical data of each slope layer include, but are not limited to, the color distribution of the slope layer, the regional boundaries, the slope range of each region, the area, and information.

[0030] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0031] (1) This invention can accurately reflect the slope changes of complex terrain by accurately calculating the slope and aspect and combining the K-means clustering optimization algorithm, and is particularly suitable for modeling sloping terrain.

[0032] (2) This method improves the accuracy of slope stratification, can effectively handle slope changes in complex terrain, optimizes the processing efficiency of large-scale terrain data, and significantly reduces computational complexity.

[0033] (3) The present invention has high flexibility and can adjust the number and threshold of slope layers according to actual needs, making it suitable for different application scenarios.

[0034] (4) This invention provides a high-precision and high-efficiency slope analysis tool for fields such as geographic information systems (GIS), urban planning, land assessment, and environmental monitoring. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is an overall flowchart of the method of the present invention;

[0037] Figure 2 This is a schematic diagram of the slope calculation method of the present invention. Detailed Implementation

[0038] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.

[0039] Reference Figure 1 As shown, the present invention provides a slope intelligent layered modeling method based on sloping terrain, comprising the following steps:

[0040] Step S1: Obtain Digital Elevation Model (DEM) data;

[0041] Step S1 uses remote sensing technology or an existing geographic information platform to obtain digital elevation model (DEM) data of the target area, which represents the elevation value of each point on the ground.

[0042] The collected multi-source data is fused. First, the satellite and UAV imagery is geometrically corrected to eliminate distortion errors, with the correction accuracy controlled within 1 meter. Then, the lidar point cloud data is registered with the corrected image data. A feature point matching algorithm is used to ensure that the different data sources are consistent in spatial location, with a registration error of no more than 0.5 meters. In addition, lidar can penetrate high-density vegetation to obtain the true surface elevation.

[0043] The remote sensing technologies include, but are not limited to, satellite imagery, UAV imagery, and lidar.

[0044] The generated DEM data is in matrix form Z(i,j), where i and j are the row index and column index in the data matrix, respectively, and Z(i,j) represents the elevation value of that point. By obtaining high-precision DEM data (the accuracy range is usually 1 meter to 10 meters), a foundation is provided for subsequent slope calculations.

[0045] Step S2: Based on the digital elevation model (DEM) data, calculate the slope θ(i,j) and aspect of each grid cell. Used to describe the slope changes and orientation of local areas of the ground;

[0046] like Figure 2 As shown, in step S2, the slope is a measure of the degree of ground change, and the aspect is the direction of ground change. Based on the DEM data, the slope θ(i,j) and aspect of each grid cell are calculated using the finite difference method.

[0047] Before the calculation, the DEM data is preprocessed with Gaussian filtering, and the filter window size is set to 3×3 to remove high-frequency noise in the data and improve the calculation accuracy.

[0048] The slope θ(i,j) is obtained by calculating the change in elevation between adjacent grid cells, as shown in the following formula:

[0049]

[0050] in, and Let x and y be the gradients of the elevation data, respectively. The elevation gradient is calculated using the following difference formula:

[0051]

[0052] The slope aspect φ(i,j) represents the direction of the slope, and its calculation formula is as follows:

[0053]

[0054] The calculated slope values ​​range from 0° to 90°, and the aspect values ​​range from 0° to 360°. These values ​​are stored as a two-dimensional array to provide data support for subsequent layered processing.

[0055] This method yields the slope and aspect of each grid cell, forming the basic slope characteristics of the terrain.

[0056] Step S3: Preprocess the calculated slope values ​​θ(i,j). First, use the Z-Score standardization method to standardize the slope data to eliminate the influence of different data magnitudes on the clustering results. The standardization formula is:

[0057]

[0058] Where μ is the mean of the slope data, and σ is the standard deviation of the slope data;

[0059] Based on terrain feature analysis, an initial slope range is preset. Depending on the terrain type of the study area and the experience of experts in the field, 3-10 initial slope ranges are preset.

[0060] The terrain types include, but are not limited to, mountains, hills, and plains;

[0061] The initial slope range is divided into 10 intervals based on terrain type:

[0062] Plains: [0,5],[5,10];

[0063] Hills: [0,8],[8,15],[15,25];

[0064] Mountainous terrain: [0,10],[10,20],[20,35],[35,50],[50,90];

[0065] The unit of measurement for the interval is degrees.

[0066] After calculating the slope and aspect information, step S3 optimizes and stratifies the slope data within each preset interval using an improved K-means clustering algorithm.

[0067] The improved K-means clustering algorithm is improved by using the elbow method combined with the silhouette coefficient method to determine the optimal number of clusters K. For each initial interval, by calculating the sum of squared errors (SSE) and silhouette coefficients under different K values, the K value with the largest silhouette coefficient and the SSE change tends to be flat is selected as the optimal number of clusters for that interval. The range of K value is controlled between 2 and 5.

[0068] The optimized stratification uses K-means clustering to stratify the slope. First, the calculated slope value θ(i,j) is divided into several preset slope intervals [θ1,θ2,...,θj]. n Then, K-means clustering algorithm is applied to each interval to obtain regions with similar slope values;

[0069] To improve clustering efficiency and stability, the Mini-Batch K-means algorithm is used to process large-scale data in batches, with each batch containing 500-1000 samples. Simultaneously, weighting factors are introduced based on slope aspect. Slope data is weighted, and for areas with drastic changes in slope aspect, the weight of the slope data in that area is increased, so that the clustering results are more in line with the actual changes in terrain.

[0070] The area with drastic changes in slope aspect refers to an area with a slope aspect change rate greater than 15° / meter;

[0071] The objective function of the K-means clustering is:

[0072]

[0073] in, For the i-th data point belonging to the k-th class, For the corresponding weighting factor, μ k For the center of class k, N k Let be the number of data points in the k-th class.

[0074] The optimization objective of K-means clustering is to minimize the distance between the data points in each category and the category center. By continuously adjusting the category centers, the objective function is minimized until convergence. The convergence threshold is set to 1e-5, and finally, accurate slope stratification results are obtained.

[0075] The table below shows the optimized stratification intervals after K-means clustering. It can be seen that the optimized stratification process results in more refined slope intervals. For example, in mountainous areas, the theoretical maximum slope is 90°, and after optimization, the maximum slope interval is [50°, 75.6°]. This demonstrates that the present invention can divide slope intervals more reasonably based on the actual environment. Furthermore, the interval [0, 6.2°] to [10.0°, 15.8°] is not continuous, indicating that a slope between 6.2° and 10° does not exist in this terrain environment.

[0076] Table 1. Optimized hierarchical intervals

[0077]

[0078]

[0079] Step S4: Perform multi-step post-processing optimization on the slope area after intelligent stratification. The optimization process includes, but is not limited to, denoising, smoothing, and fine stratification, to finally obtain a smooth and accurate slope stratification result.

[0080] In step S4, the slope area after intelligent stratification may contain noise and irregular areas. Therefore, the present invention further optimizes the post-processing. The optimization process includes, but is not limited to, noise reduction, smoothing, and boundary refinement steps to ensure that the stratification results are more accurate and smooth.

[0081] First, a morphological filtering algorithm is used for noise reduction. A 3×3 structuring element is selected to perform erosion and dilation operations on the layered results to remove isolated noise points.

[0082] The isolated noise point refers to an area with a size of less than 5 grid cells;

[0083] The Gaussian smoothing algorithm was used to smooth the denoised layered results. The smoothing window size was set to 5×5 and the standard deviation was set to 1.0-1.5 to make the boundary transition of the layered regions more natural.

[0084] Refined boundary optimization is performed by extracting the initial boundaries of the layered regions through edge detection algorithms, and then fitting the boundaries with B-spline curves to make the boundaries smoother and more accurate. For the boundary overlap or gap problem of adjacent layered regions, the boundary position is adjusted by calculating the gradient change of the boundary to ensure the continuity and accuracy of the boundary.

[0085] The edge detection algorithm includes, but is not limited to, the Canny operator;

[0086] A cross-validation mechanism is introduced, randomly selecting 10% of the terrain data as the validation set. The optimized stratification results are compared with the actual terrain features of the validation set, and the stratification error is calculated. If the error exceeds a preset threshold, the process returns to the clustering step to readjust the clustering parameters for optimization until the error requirement is met.

[0087] In some embodiments, the stratification error is 0.05.

[0088] Step S5: The optimized stratification results are presented in a graphical form, outputting the specific regional distribution and statistical data of each slope layer;

[0089] The stratification results are displayed using multi-dimensional visualization technology, showing the regional division of slope stratification.

[0090] The specific regional distribution and statistical data of each slope layer include, but are not limited to, the color distribution of the slope layer, the regional boundaries, the slope range of each region, the area, and information;

[0091] First, a three-dimensional terrain model is constructed, and the DEM data is combined with the slope layering results. The terrain is rendered in three dimensions using OpenGL technology, with rendering accuracy reaching the grid cell level.

[0092] In the 3D model, different color codes are used to display the different slope layers. The color gradient gradually changes from low slope to high slope, and the color interval is evenly set according to the distribution range of the slope value. At the same time, the boundary lines of the layered regions are overlaid on the model. The boundary lines are displayed in bold and highlighted form, and the line width is set to 2-3 pixels.

[0093] Detailed statistical reports are generated, including the slope range, area, proportion of the total area, average slope value, and slope standard deviation of each slope layer. The area distribution of each slope layer is displayed in chart form, providing users with intuitive data analysis results.

[0094] The chart formats include, but are not limited to, histograms and pie charts;

[0095] An interactive visual interface was developed, allowing users to zoom, pan, and rotate to view detailed slope stratification of different areas. It also supports user-defined query functionality, enabling users to input any coordinate point to retrieve the slope stratum and related slope information for that point.

[0096] This invention has many specific applications. The above description is only a preferred embodiment of this invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of this invention, and these improvements should also be considered within the scope of protection of this invention.

Claims

1. A slope intelligent hierarchical modeling method based on sloping terrain, characterized in that, The steps are as follows: Step S1: Obtain Digital Elevation Model (DEM) data; Step S2: Based on the digital elevation model (DEM) data, calculate the slope θ(i,j) and aspect of each grid cell. Used to describe the slope changes and orientation of local areas of the ground; Step S3: Divide the calculated slope value θ(i,j) into several preset initial slope intervals, and then optimize the slope data by layering based on the K-means clustering algorithm; Step S4: Perform post-optimization processing on the slope intervals after optimization and stratification. The optimization process includes, but is not limited to, denoising, smoothing, and fine stratification. Step S5: The optimized stratification results are presented in a graphical form, outputting the specific regional distribution and statistical data of each slope layer.

2. The method according to claim 1, characterized in that, Step S1 uses remote sensing technology or an existing geographic information platform to acquire digital elevation model (DEM) data of the target area; the digital elevation model (DEM) data represents the elevation value of each point on the ground, and is represented in matrix form Z(i,j), where i and j are the row index and column index in the matrix, respectively, and Z(i,j) represents the elevation value of that point; The remote sensing technologies include, but are not limited to, satellite imagery, UAV images, and lidar.

3. The method according to claim 1, characterized in that, The slope in step S2 is a measure of the degree of ground change, and the slope aspect is the direction of ground change. Based on the DEM data, the slope θ(i,j) and slope aspect φ(i,j) of each grid cell are calculated using the difference method. The slope θ(i,j) is obtained by calculating the change in elevation of adjacent grid cells, and the gradient of the elevation data in the x and y directions can be calculated by the difference formula. The slope Indicates the direction of the slope; This method yields the slope and aspect of each grid cell, forming the basic slope characteristics of the terrain.

4. The method according to claim 1, characterized in that, In step S3, after calculating the slope and aspect information, an improved K-means clustering algorithm is used to stratify the slope. First, the calculated slope value θ(i,j) is divided into several preset initial slope intervals [θ1,θ2,...,θ]. n Then, K-means clustering algorithm is applied to each interval to obtain regions with similar slope values; The improved K-means clustering algorithm uses the elbow method combined with the silhouette coefficient method to determine the optimal number of clusters K. For each initial interval, by calculating the sum of squared errors (SSE) and silhouette coefficients under different K values, the K value with the largest silhouette coefficient and the SSE change rate within a certain threshold is selected as the optimal number of clusters for that interval. The range of K values ​​is controlled between 2 and 5. A weighting factor is introduced to weight the slope data according to the slope aspect. For areas where the slope aspect change rate is greater than the preset change rate threshold, the weight of that area is increased. The goal of the improved K-means clustering is to minimize the distance between the data points in each category and the category center. The optimization goal of K-means clustering is to minimize the objective function by continuously adjusting the category centers until convergence, and finally obtain the slope stratification result. The mathematical expression of the objective function J is as follows: in, For the i-th data point belonging to the k-th class, For the corresponding weighting factor, μ k For the center of the k-th class, N k The number of data points in the k-th class.

5. The method according to claim 1, characterized in that, The optimization process in step S4 includes, but is not limited to, noise reduction, smoothing, and boundary refinement steps. The denoising process employs a morphological filtering algorithm, using a 3×3 structuring element to perform erosion and dilation operations on the layered results. The smoothing process employs a Gaussian smoothing algorithm, with a smoothing window set to 5×5 and a standard deviation set to 1.0-1.

5. The refined boundary is achieved using an edge detection algorithm and the Canny operator.

6. The method according to claim 1, characterized in that, The stratification results are presented in a graphical form, showing the regional division of slope stratification; The specific regional distribution and statistical data of each slope layer include, but are not limited to, the color distribution of the slope layer, the regional boundaries, the slope range of each region, the area, and information.

7. The method according to claim 1, characterized in that, The initial slope range is divided into 10 intervals based on terrain type: Plains: [0,5],[5,10]; Hills: [0,8],[8,15],[15,25]; Mountainous terrain: [0,10],[10,20],[20,35],[35,50],[50,90]; The unit of measurement for the interval is degrees.