A road slope calculation method and device based on digital surface model

By using a digital surface model-based method to obtain high spatial resolution data and perform node interpolation and slope change point processing, the problem of inaccurate acquisition of road slope data over a large area is solved, and automatic and accurate calculation of road slope is achieved.

CN119879847BActive Publication Date: 2025-09-12TWENTY FIRST CENTURY AEROSPACE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411984651.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-09-12
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In existing technologies, when obtaining road slope data within a large study area, it is difficult to obtain a high-precision and high-spatial-resolution digital elevation model (DEM), which results in the inability to accurately capture local slope changes and inaccurate slope data.

Method used

A method based on digital surface model is used to obtain high spatial resolution digital surface model and orthophoto raster data. The road centerline is interrupted by the road intersection point vector, and node interpolation and moving average curve processing are performed to determine the slope change point, and the road centerline is interrupted to calculate the accurate road slope.

Benefits of technology

It realizes the automatic and accurate extraction of road slopes in large areas, avoids the problem of inaccurate slope calculation caused by the influence of grid resolution, and ensures the precision and accuracy of slope calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119879847B_ABST
    Figure CN119879847B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for calculating road slopes based on a digital surface model, the purpose of which is to provide a solution for automatically extracting road slopes in large areas. The main technical solution of the present invention is as follows: obtaining a first digital surface model (DOM) and a first digital orthophoto map (DSM) of the study area with high spatial resolution; obtaining a first road surface vector and a first road centerline line vector based on the first DOM; interrupting the line entities in the first road centerline line vector according to road intersections to obtain a second road centerline line vector; performing node interpolation on the second road centerline line vector to obtain a third road centerline line vector; determining the slope change point based on the third road centerline line vector and the DSM using a moving average curve; interrupting the line entities in the second road centerline line vector according to the slope change point to obtain a fourth road centerline line vector; and calculating the slope of each line entity in the fourth road centerline line vector, i.e., the road slope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of remote sensing applications, and in particular to a method and device for calculating road slope based on a digital surface model. Background Art

[0002] As human society continues to develop, the importance of roads in many areas has become increasingly prominent. As a key element of roads, road slope plays a vital role in ensuring traffic safety and facilitating route planning.

[0003] In the existing technology, the road slope data in a large-scale study area can usually only be obtained by using a digital elevation model (DEM). That is, the elevation difference of a road segment at a certain distance on the DEM data is used to calculate the slope of this section of road, and the road slopes of all road segments are summarized to obtain the road slopes of the roads in the study area.

[0004] However, for large-scale applications, high-precision, high-spatial-resolution DEM data is difficult to obtain and its update timeliness is poor, making it difficult to apply in engineering applications. Calculating road slopes based on lower-resolution DEMs is limited by its resolution. When there are local elevation fluctuations on the road, it is impossible to accurately capture the actual slope changes. If road slope data is still obtained according to a pre-defined grid, the road slopes obtained for roads within the study area will be inaccurate. Summary of the Invention

[0005] The embodiment of the present application provides a road slope calculation method based on a digital surface model, the purpose of which is to determine a practical and feasible technical solution that can accurately and automatically extract road slopes in research areas of large areas and large scenes.

[0006] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0007] In a first aspect, the present application provides a method for calculating road slope based on a digital surface model, the method comprising:

[0008] Obtaining first digital surface model raster data and first digital orthophoto map raster data with high spatial resolution in the study area;

[0009] Acquire first road surface vector data and first road centerline vector data based on the first digital orthophoto raster data;

[0010] generating a road intersection point vector based on the first road centerline line vector data, and breaking the first road centerline line vector according to the road intersection point vector to obtain a second road centerline line vector;

[0011] Performing node interpolation on each line entity in the second road centerline line vector data to obtain third road centerline line vector data;

[0012] determining, based on the first digital surface model raster data, an elevation value of each node in the third road centerline vector data;

[0013] Using a moving average curve, finding a slope change point that falls on the centerline vector data of the third road;

[0014] Interrupting the line entity in the second road centerline line vector data according to the slope change point to obtain fourth road centerline line vector data;

[0015] The road slope of each line entity in the fourth road centerline line vector data is calculated using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the fourth road centerline line vector data.

[0016] In a second aspect, the present application provides a road slope calculation device based on a digital surface model, the device comprising:

[0017] An input acquisition unit is used to acquire first digital surface model raster data and first digital orthophoto map raster data with high spatial resolution of the study area;

[0018] The input acquisition unit is used to acquire first road surface vector data and first road centerline vector data based on the first digital orthophoto raster data;

[0019] The input acquisition unit generates a road intersection point vector based on the first road centerline line vector data, and breaks the first road centerline line vector according to the road intersection point vector to obtain a second road centerline line vector;

[0020] a node interpolation and elevation acquisition unit, configured to perform node interpolation on each line entity in the second road centerline line vector data input into the acquisition unit to obtain third road centerline line vector data;

[0021] The node interpolation and elevation acquisition unit is configured to determine the elevation value of each node in the third road centerline vector data based on the first digital surface model raster data input to the acquisition unit;

[0022] a slope change point determination unit, configured to use a moving average curve to find a slope change point that falls on the third road centerline line vector data of the node interpolation and elevation acquisition unit;

[0023] a slope calculation unit, configured to interrupt the line entity in the second road centerline line vector of the input acquisition unit according to the slope change point in the slope change point determination unit to obtain fourth road centerline line vector data;

[0024] The slope calculation unit is used to calculate the road slope of each line entity in the fourth road centerline line vector data using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the third road centerline line vector data.

[0025] In a third aspect, the present invention provides an electronic device comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is configured to call program instructions in the memory to execute the above-mentioned road slope calculation method based on a digital surface model.

[0026] In a fourth aspect, the present application provides a storage medium, a readable storage medium, which is used to store a computer program, wherein when the computer program is running, it controls the device where the storage medium is located to execute the above-mentioned road slope calculation method based on the digital surface model.

[0027] By means of the above-mentioned technical solution, the present application provides a method and apparatus for calculating road slopes based on a digital surface model. This solution is automatically executed according to predetermined steps. First, high-spatial-resolution first digital surface model raster data and first digital orthophoto raster data of the study area are obtained. Based on the first digital orthophoto raster data, line vector data for the first, second, and third road centerlines are further obtained. Based on the planar projection coordinates of the nodes within the line entity of the third road centerline line vector and the first digital surface model raster data, the elevation values ​​of the nodes within the line entity of the third road centerline line vector are accurately determined, laying the foundation for subsequent calculations. Secondly, the elevation values ​​are processed using a moving average curve to accurately determine the slope change points. Finally, the fourth road centerline line vector data is determined based on the line entity in the second road centerline line vector being interrupted according to the slope change point; the road slope of each line entity in the fourth road centerline line vector is calculated using the plane projection coordinates and elevation values ​​of the two endpoints of each line entity in the fourth road centerline line vector, thereby ensuring the calculation accuracy of the fourth road centerline, and further ensuring the accuracy of the road slope calculation of each line entity in the fourth road centerline line vector data formed by the second road centerline line vector interrupted by the slope change point. It can be seen that the above technical solution does not need to calculate the road slope according to a fixed distance, thus avoiding the situation where the road slope of the roads in the study area obtained by obtaining the road slope data according to a predetermined distance is inaccurate, and can interrupt the line entity in the second road centerline line vector based on the slope change point in the third road centerline line vector, thereby forming the fourth road centerline line vector, thereby ensuring the accuracy of the road slope calculation of each line entity in the fourth road centerline line vector data. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0029] Figure 1 A flow chart of a method for calculating road slope based on a digital surface model proposed in one embodiment of the present application is shown;

[0030] Figure 2 A flowchart of another method for calculating road slope based on a digital surface model proposed in one embodiment of the present application is shown;

[0031] Figure 3 A flow chart of a method for calculating road slope based on a digital surface model proposed in another embodiment of the present application is shown;

[0032] Figure 4A schematic structural diagram of a road slope calculation device based on a digital surface model provided by one embodiment of the present application is shown;

[0033] Figure 5 A schematic structural diagram of a road slope calculation device based on a digital surface model provided in another embodiment of the present application is shown. DETAILED DESCRIPTION

[0034] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0035] It should be noted that, unless otherwise specified, the technical or scientific terms used in this application should have the common meanings understood by those skilled in the art to which this application belongs.

[0036] With the continuous development of human society, existing technologies usually require the use of digital elevation models to obtain relevant information about roads in the study area. That is, the elevation values ​​of the road information within the DEM grid are used to calculate the road slopes of the roads within the grid. Based on the road slopes of all grid roads, the road slopes of the roads in the study area are determined. However, it is very difficult to obtain a DEM with high precision and high spatial resolution over a large area. Generally, only DEMs with lower resolution can be obtained. This method of calculating road slopes based on the grid of DEM resolution is affected by its resolution. When there are local elevation fluctuations in the road, it is impossible to accurately capture the actual local slope changes of the road. If the road slope data is still obtained according to the established grid, the road slopes of the roads in the study area will be inaccurate.

[0037] To this end, the inventors of this application propose a road slope calculation method based on a digital surface model, which can automatically obtain road slope data based on first digital surface model raster data and first digital orthophoto raster data of a study area with high spatial resolution; obtain first road surface vector data and first road centerline line vector data based on the first digital orthophoto raster data; generate a road intersection point vector based on the first road centerline line vector data, interrupt the first road centerline line vector according to the road intersection point vector, and obtain a second road centerline line vector; and calculate the second road centerline line vector data. The method further comprises performing node interpolation on each line entity in the first digital surface model raster data to obtain third road centerline line vector data; determining the elevation value of each node in the third road centerline line vector data based on the first digital surface model raster data; finding the slope change point falling on the third road centerline line vector data using a moving average curve; interrupting the line entity in the second road centerline line vector data according to the slope change point to obtain fourth road centerline line vector data; and calculating the road slope of each line entity in the fourth road centerline line vector data using the plane projection coordinates and elevation values ​​of the two endpoints of each line entity in the fourth road centerline line vector data. It can be seen that the above technical solution uses the slope change point as the slope calculation dividing line, thereby avoiding the calculation of the road slope based on the grid resolution, ensuring the accuracy of the road slope calculation, and thus ensuring the correctness of the road slope.

[0038] The embodiment of the present application provides a method for calculating road slope based on a digital surface model, and its specific steps are as follows: Figure 1 Shown, including:

[0039] Step 101: Obtain first digital surface model raster data and first digital orthophoto raster data of a study area with high spatial resolution.

[0040] In this step, the remote sensing satellite image is preprocessed to obtain a high-altitude resolution digital orthophoto image covering the study area. The preprocessing includes operations such as orthorectification, fusion, mosaicking, and color grading to obtain high-spatial resolution first digital surface model raster data and first digital orthophoto map raster data for the study area. The first digital surface model raster data represents the elevation information of each geographic location within the study area. This raster data can be obtained by stereo imaging using the Beijing-3 series satellites, WorldView-3 satellites, etc., or automatically obtained through methods such as lidar satellite point clouds and airborne laser point clouds. In addition, the first digital orthophoto map raster data and the first digital surface model raster data use the same plane projection coordinate system.

[0041] Step 102: Obtain first road surface vector data and first road centerline vector data based on the first digital orthophoto raster data.

[0042] After the raster data is determined in step 101, the first road surface vector data and the first road centerline line vector data are extracted based on the color and texture of the object based on the first digital orthophoto raster data. The first road surface vector data refers to the surface vector data that expresses the road as an area surrounded by a polygon, and the first road centerline line vector data refers to the line vector data that expresses the road as the centerline of the road. The above-mentioned first road centerline line vector data has a road unique identifier, and its unique identifier field can be "Line_ID". It is worth noting that when obtaining the first road centerline line vector data, if the first road surface is blocked by vegetation or damaged houses, the area can also be extracted based on the color and texture data of the object blocking the first road surface, combined with the first digital orthophoto raster data, and the area is named as an abnormal area. The data of this abnormal area is surface vector data.

[0043] Step 103: Generate a road intersection point vector based on the first road centerline line vector data, and break the first road centerline line vector according to the road intersection point vector to obtain a second road centerline line vector.

[0044] After obtaining the first road centerline line vector in step 102, a road intersection point vector is determined based on the number of occurrences of the node coordinates of the line entity in the first road centerline line vector. The first road centerline line vector is then interrupted using the road intersection point vector to obtain a second road centerline line vector. If the (x, y) coordinate pair constituting the line entity appears two or more times in the first road centerline line vector, the location of this coordinate pair is a road intersection. The point vector generated based on this location is the road intersection point vector. One line entity in the first road centerline line vector corresponds to multiple line entities in the second road centerline line vector.

[0045] Step 104 : Perform node interpolation on each line entity in the second road centerline line vector data to obtain third road centerline line vector data.

[0046] The distance between two adjacent nodes in the second road centerline line entity is determined, specifically, whether the distance between two adjacent nodes in the second road centerline line entity is greater than or equal to a first threshold interval. If so, a node is inserted at intervals corresponding to the first threshold interval. Specifically, the distance between adjacent nodes in the second road centerline line entity is obtained. If the distance is greater than or equal to the first threshold interval, a node is added to the third road centerline line vector at intervals corresponding to the first threshold interval, thereby obtaining a node-interpolated encrypted third road centerline line vector. The unique identification field value of the line entity for this node is equal to the unique identification field value of the line entity for the road head node. By performing node interpolation on the line entities of the second road centerline line vector where the distance between two adjacent nodes is greater than the first threshold interval, inaccurate slope calculation caused by excessive spacing between adjacent nodes in the line entity of the third road centerline line vector can be avoided. By segmenting the line entity according to the first threshold, the granularity of the third road centerline line vector data obtained using this node interpolation method is ensured to be finer, thereby ensuring a more accurate slope.

[0047] It is worth noting that the interval value here follows the following principles: (1) Each road can have at most one slope change point within an interval; (2) On the basis of ensuring that (1) is met, the interval value should be as large as possible to avoid excessive interpolation points affecting calculation efficiency; (3) The interval value should be greater than or equal to twice the DSM plane resolution. If this principle conflicts with the first principle, it means that the DSM is not accurate enough and consideration should be given to using DSM data with higher accuracy.

[0048] Step 105: Determine the elevation value of each node in the third road centerline vector data based on the first digital surface model raster data.

[0049] After the third road centerline line vector data is determined in step 104, a method for determining the elevation value of each node in the third road centerline line vector data based on the first digital surface model raster data is as follows:

[0050] For the third road centerline line vector, obtain the plane projection coordinates of each node and generate the point vector Point1 based on these coordinates. Create the attribute fields "Line_ID," "Distance to Line Start," and "Distance to Line End" for the point vector Point1 and assign corresponding values. The value of "Line_ID" is equal to the value of "Line_ID" in the corresponding third road centerline line vector. The specific calculation formulas for "Distance to Line Start" and "Distance to Line End" are:

[0051]

[0052] L1=L-L0

[0053] In the above formula, L0 represents the distance to the beginning of the line at the current point, i represents the point number, which corresponds to the order in which the node appears in the line vector of the third road centerline, starting from 1, n represents the order of the current point, and x represents the distance to the beginning of the line. i and y i Represents the horizontal and vertical coordinates of the i-th point, x i-1 and y i-1 They represent the horizontal and vertical coordinates of the i-1th point respectively, L1 represents the "distance to the end of the line" of the current point, and L represents the length of the current road line, and its value is equal to the "distance to the beginning of the line" of the last point.

[0054] After determining the point vector Point1 and the DSM raster map, add the "Elevation" field and "Slope" to the point vector Point1, and fill the "Elevation" field with the pixel value of the DSM raster map corresponding to the point location. Calculate the slope of the line connecting the "Elevation" field values ​​of the two adjacent points and fill it in the "Slope" field of the latter point. If the "Slope" field value of a point is greater than T or less than -T, the point is determined to be an elevation anomaly. The "Slope" is calculated as follows:

[0055] Assuming the coordinates of the two points before and after are (x1, y1) and (x2, y2), respectively, when x1 ≠ x2, the slope k is calculated as follows: k = (y2-y1) / (x2-x1). When x1 = x2, the straight line formed by the two points before and after is parallel to or coincides with the y-axis, and the slope does not exist. Here, a large value of 99999 is used to indicate this. The elevation of the outlier point is replaced by the average of the elevations of the two points before and after the outlier point and filled in the "Elevation" field. If it is the first point on the road line, the elevation value of the next point is used instead; if it is the last point on the road line, the elevation value of the previous point is used instead. This replacement process is repeated in a loop until the "Slope" field value is no longer greater than T or less than -T. Since this step is performed on the point vector Point1, the output result is still the point vector Point1.

[0056] In the point vector Point1 obtained in the previous step, the "elevation" field value corresponding to the point falling within the range of the abnormal area surface vector may still be an abnormal value. Therefore, the location data of the abnormal area, that is, the abnormal area surface vector, is obtained based on the first digital orthophoto raster data. The abnormal area surface vector anomalyarea is buffered outward by a distance of the size of a pixel to obtain the surface vector anomalyareabuffer. The surface vector anomalyareabuffer is converted into a closed line vector anomalyareabufferline. The third road centerline line vector and the line vector anomalyareabufferline are spatially intersected to obtain two intersection points, and the DSM values ​​of the two intersection points are obtained. The DSM values ​​of the two intersection points are used to interpolate the elevation values ​​of the points in the point vector Point1 that fall within the abnormal area surface vector anomalyarea using the linear interpolation method, replacing the original "elevation" field value.

[0057] Step 106: Use the moving average curve to find the slope change point that falls on the third road centerline vector data.

[0058] After determining the elevation value of each node in the third road centerline line vector data in step 105, this embodiment further determines the slope change point in the centerline entity of the third road centerline line vector. The slope change point refers to the point where the slope changes in the longitudinal section of the road or the longitudinal direction of the terrain, that is, the connection point of two adjacent sections with different slopes. In this case, the slope change point is a vector point.

[0059] In this step, the method for determining the slope change point is as follows: based on the elevation values ​​of the nodes in the third road centerline line vector data, a first moving average curve and a second moving average curve are established; based on the first moving average curve and the second moving average curve, a high point area and a low point area are determined, wherein the high point area represents that the line entity in the third road centerline line vector data is a small section of the road centerline arc segment including the highest point of the uphill road, and the low point area represents that the line entity in the third road centerline line vector data is a small section of the road centerline arc segment including the lowest point of the downhill road; based on the high point area and the low point area, the slope change point is determined. Specifically:

[0060] Based on the point vector Point1, new fields "MA1" and "MA2" are created. The final elevation value of the point vector Point1 is calculated as a moving average for every T1 consecutive points. This average value is added to the attribute field M1 of the last node among the N1 nodes. The moving average value is calculated for every T2 consecutive points and this average value is added to the attribute field M2 of the last node among the N2 nodes, where N1 is less than N2. The field values ​​of M1 and M2 are sequentially connected to form a first moving average curve and a second moving average curve. Based on whether the first moving curve and the second moving curve intersect and the intersection method, a high point area and a low point area are determined. The first point in the high point area and the second point in the low point area are determined, where the first point is the point with the maximum elevation value in the high point area and the second point is the point with the minimum elevation value in the low point area. The foot of the perpendicular between the first point and the second point to the centerline entity of the third road centerline line vector is obtained, and the foot of the perpendicular is determined as the slope change point.

[0061] Step 107: interrupt the line entity in the second road centerline line vector according to the slope change point to obtain fourth road centerline line vector data.

[0062] After determining the slope change point in step 106, the line entity in the second road centerline line vector is interrupted by using the slope change point to obtain the fourth road centerline line vector data. The specific implementation method is as follows: based on the slope change point set, the line entity in the second road centerline line vector is divided into independent road segments with adjacent slope change points as endpoints, i.e., the line entity of the fourth road centerline line vector. When the line entity in the second road centerline line vector is interrupted at the slope change point, the interrupted line entity of the fourth road centerline line vector has unique identification information, which can be "Line_ID" or "ID". In this step, the line entity of the second road centerline line vector is interrupted at the slope change point where the road actually changes, ensuring that the slope change trend within the line entity of the fourth road centerline line vector is consistent, preventing the occurrence of both upslope and downslope in the same road segment, and thus ensuring the accuracy of the calculated road slope.

[0063] Before interrupting the line entity of the second road centerline line vector at the slope change point, a determination is made as to whether interrupting the line entity of the second road centerline line vector at the slope change point will cause the length of the line entity of the fourth road centerline line vector after the interruption to be too short from the start node to the end node. Specifically, the distance from the slope change point to the start node and the end node of the line entity of the third road centerline line vector is determined. If this distance is less than a preset first distance value DT, the slope change point is deleted. The preset first distance is a distance value set based on actual application, and its specific value is not limited herein. This step prevents the line entity of the fourth road centerline line vector determined based on the slope change point from being too short.

[0064] Step 108: Calculate the road slope of each line entity in the fourth road centerline line vector data using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the fourth road centerline line vector data.

[0065] In this step, the two endpoints refer to the starting node and the ending node of each line entity in the fourth road centerline line vector. The first road centerline line vector data can be generated based on the first road surface vector data, or it can be directly generated based on the first digital orthophoto raster according to a certain algorithm. The line entity of the second road centerline line vector data is formed by interrupting the line entity of the first road centerline line vector data at the road intersection point. The third road centerline line vector data is obtained by node interpolation of the second road centerline line vector data, and the line entity of the fourth road centerline line vector data is formed by interrupting the line entity of the second road centerline line vector data at the slope change point.

[0066] After determining the fourth road centerline vector in step 107, spatial analysis is used to obtain the "Elevation" field value from the slope change point that coincides with the starting endpoint of each road segment in the fourth road centerline vector and fill it into the "Starting Elevation" field. The "Elevation" field value is obtained from the slope change point that coincides with the ending endpoint of each road segment in the fourth road centerline vector and fills it into the "Ending Elevation" field. The elevation difference of each road segment is calculated according to the following formula and filled into the "Elevation Difference" field of the fourth road centerline vector. Here, Elevation Difference = Value of the "Starting Elevation" field - Value of the "Ending Elevation" field. The distance of each road segment is calculated according to the following formula and filled into the "Distance" field of the fourth road centerline vector.

[0067]

[0068] Among them, L represents the length of the road section, i represents the node number on the current road section, n represents the number of points, and x i and y i Represents the horizontal and vertical coordinates of the i-th node, x i-1 and y i-1 Represent the horizontal and vertical coordinates of the i-1th node respectively.

[0069] Calculate the slope of each road section according to the following formula and fill in the "Slope" field of the fourth road centerline vector.

[0070] Slope of the road segment = "elevation difference" field value / "distance" field value * 100%

[0071] Based on the above Figure 1As can be seen from the implementation method, this application provides a road slope calculation method based on a digital surface model. The solution is automatically executed according to the established steps. First, based on the acquisition of the first digital surface model raster data and the first digital orthophoto raster data of the study area with high spatial resolution, the first, second, and third road centerline line vectors are determined. Based on the plane projection coordinates of the nodes in the line entity of the third road centerline line vector and the first digital surface model raster data, the elevation values ​​of the nodes in the line entity of the third road centerline line vector are accurately determined, laying the foundation for subsequent calculations. Secondly, the elevation values ​​are processed using a moving average curve to accurately determine the slope change points. Finally, the fourth road centerline line vector data is obtained by interrupting the line entity in the second road centerline line vector according to the slope change point; the road slope of each line entity in the fourth road centerline line vector is calculated using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the fourth road centerline line vector, thereby ensuring the accuracy of the road slope calculation for each line entity in the fourth road centerline line vector data formed by the second road centerline line vector interrupted by the slope change point. It can be seen that the above technical solution does not need to calculate the road slope according to a fixed distance, avoiding the situation where the road slope of the roads in the study area obtained by obtaining road slope data according to a predetermined distance is inaccurate. It can determine the slope change point based on the third road centerline line vector, and use the slope change point to interrupt the second road centerline line vector to form the fourth road centerline line vector, thereby ensuring the accuracy of the road slope calculation for each line entity in the fourth road centerline line vector data.

[0072] Furthermore, according to the above Figure 1 In the embodiment of the present invention shown, when the first road centerline line vector data is interrupted by multiple road intersections in the road surface vector of the study area to form a second road centerline line vector midline entity, if the distance between adjacent nodes of the second road centerline line vector midline entity is greater than the first threshold, a node is inserted after the second road centerline line vector midline entity at a distance of the first threshold to form a third road centerline line vector midline entity after node interpolation. In this case, how to determine the slope change point based on the third road centerline line vector midline entity after node interpolation, and then determine the slope of the road. The embodiment of the present application will give a more detailed explanation, specifically as follows Figure 2 Shown, including:

[0073] Step 201: Determine the elevation values ​​of nodes in the centerline entity of the third road centerline line vector after node interpolation based on the position data of the centerline entity of the third road centerline line vector after node interpolation and the first digital surface model raster data.

[0074] In this step, the planar projection coordinates of each node in the third road centerline line vector after node interpolation are obtained, and point vector Point1 is generated based on these coordinates. The attribute fields "Line_ID," "Distance to Line Start," and "Distance to Line End" are established for point vector Point1 and assigned corresponding values. The value of "Line_ID" is equal to the value of "Line_ID" in the third road centerline line vector after node interpolation. The specific calculation formulas for "Distance to Line Start" and "Distance to Line End" are:

[0075]

[0076] L1=L-L0

[0077] In the above formula, L0 represents the distance to the beginning of the line at the current point, i represents the point number, which corresponds to the order in which the node appears in the line vector of the third road centerline, starting from 1, n represents the order of the current point, and x represents the distance to the beginning of the line. i and y i Represents the horizontal and vertical coordinates of the i-th point, x i-1 and y i-1 They represent the horizontal and vertical coordinates of the i-1th point respectively, L1 represents the "distance to the end of the line" of the current point, and L represents the length of the current road line, and its value is equal to the "distance to the beginning of the line" of the last point.

[0078] After determining the input point vector Point1 and the DSM raster, add the "Elevation" and "Slope" fields to Point1 and enter the DSM raster pixel value corresponding to the point's location in the "Elevation" field. Calculate the slope of the line connecting the "Elevation" field values ​​of two adjacent points and enter it into the "Slope" field of the latter point. If the "Slope" field value of a point is greater than T or less than -T, it is considered an elevation outlier.

[0079] The "slope" is calculated as follows: Assuming that the coordinates of the two points before and after are (x1, y1) and (x2, y2) respectively, when x1≠x2, the slope k is calculated as follows: k=(y2-y1) / (x2-x1). When x1=x2, the straight line formed by the two points before and after is parallel to or coincides with the y-axis, and the slope does not exist. Here, a large value of 99999 is used to indicate this. The elevation of the outlier point is replaced by the average of the elevations of the two points before and after the outlier point and filled in the "Elevation" field; if it is the first point on the road line, the elevation value of the next point is used instead; if it is the last point on the road line, the elevation value of the previous point is used instead. Use a loop to perform the above replacement process until there is no case where the "slope" field value is greater than T or less than -T. Since this step is modified on the point vector Point1, the output result is still the point vector Point1.

[0080] After correcting the point vector Point1, the "elevation" field values ​​corresponding to the points in the corrected point vector Point1 that fall within the range of the abnormal area surface vector may still be abnormal values. Therefore, the location data of the abnormal area, that is, the abnormal area surface vector, is obtained based on the first digital orthophoto raster data. The abnormal area surface vector anomalyarea is buffered outward by a distance of the size of a pixel to obtain the surface vector anomalyareabuffer. The surface vector anomalyareabuffer is converted into a closed line vector anomalyareabufferline. The third road centerline line vector and the line vector anomalyareabufferline are spatially intersected to obtain two intersection points, and the DSM values ​​of the two intersection points are obtained. The DSM values ​​of the two intersection points are used to interpolate the elevation values ​​of the points in the point vector Point1 that fall within the abnormal area surface vector anomalyarea using the linear interpolation method, replacing the original "elevation" field value.

[0081] In this embodiment, the specific implementation of step 201 is as follows: after correcting the elevation value of the elevation anomaly point, it is further determined whether the centerline entity of the third road centerline line vector after node interpolation is blocked by an object, that is, the position data of the abnormal area is obtained based on the first digital orthophoto raster data, and the abnormal area is the area formed by the object blocking the centerline entity of the third road centerline line vector after node interpolation; based on the position data of the abnormal area, it is determined whether there is a node in the centerline entity of the third road centerline line vector after node interpolation located in the abnormal area; if so, the nodes not located in the abnormal area are determined based on the position data of the abnormal area and the position data of the nodes in the centerline entity of the third road centerline line vector after node interpolation; and the elevation values ​​of the nodes located in the abnormal area are determined using a linear interpolation method based on the position data of the nodes and the first digital orthophoto raster data.

[0082] In this embodiment, the method for determining the elevation value of the node falling into the abnormal area is as follows:

[0083] Method 1: When a node in the third road centerline vector midline entity after node interpolation is located in an abnormal area, a buffering operation is performed based on the location data of the abnormal area to obtain an expanded area. This area is buffered outward by a distance equal to one DSM pixel. The boundary of the expanded area now forms a closed boundary line. The midline entity of the third road centerline vector after node interpolation is spatially intersected with the closed boundary line to obtain the location data of the two intersection points. The elevation values ​​of these two points are determined in the first digital surface model raster data. The elevation values ​​of the nodes falling in the abnormal area are interpolated using linear interpolation using these two-point elevation values, replacing the original elevation values ​​of the points. It is worth noting that the aforementioned outward buffering by a distance equal to one DSM pixel refers to buffering away from the abnormal area at the boundary points of the abnormal area. For example, if the abnormal area is an area defined by a radius R = N around the center point (0, 0), and the pixel distance is N, then the outward buffering is a distance N away from the center point. In this case, the closed boundary line formed by the circular boundary points defined by the center point (0, 0) and a radius of 2N forms the closed boundary line.

[0084] Method 2: Determine the road points in the line entity of the third road centerline line vector after node interpolation that do not fall in the abnormal area, select any two points A and B, and then calculate the elevation values ​​of the nodes in the line entity of the third road centerline line vector after node interpolation that fall in the abnormal area using the linear interpolation method based on the specific positions of points A and B, the elevation values ​​determined in the first digital surface model raster data based on their specific positions, and the positions of the nodes that fall in the abnormal area.

[0085] It is worth noting that in this step, the first digital surface model raster data represents the surface elevation values ​​of the study area, and each pixel therein has spatial position information and elevation value information. The first digital orthophoto map and the first digital surface model are in the same coordinate system.

[0086] Step 202: Based on the elevation value, use the fast and slow moving average curves to determine the slope change point in the centerline entity of the third road centerline vector after node interpolation.

[0087] After determining the elevation values ​​of the nodes in the interpolated third road centerline vector's centerline entity in step 201, to ensure accurate identification of slope change points, the planar projection coordinates of each node in the third road centerline vector are obtained. A point vector Point1 is generated based on these coordinates, and attribute fields "MA1" and "MA2" are established for Point1. A moving average of the final elevation value of Point1 is calculated for every T1 consecutive points, and this average is entered into the "MA1" attribute field of the last point in the T1-consecutive series. A moving average is calculated for every T2 consecutive points and added to the attribute field M2 of the last node in the T2-consecutive series, where T1 is less than T2. ​​The M1 and M2 field values ​​are sequentially concatenated to form fast and slow moving average curves. High and low point regions are determined based on whether and how the fast and slow moving average curves intersect. The "RegionType" attribute field is added to distinguish these regions, with high points identified in high point regions and low points identified in low point regions. Obtain the foot of the midline entity of the third road centerline line vector after interpolation from the high point and the low point to the node, and determine the foot of the perpendicular as the slope change point.

[0088] In the above steps, to ensure the accuracy of high point determination, the specific operation of determining high points in the high point area is as follows: Based on the point vector Point1, the high point area line vector LineTopBottomRegion, the DSM raster data, the abnormal area buffer surface vector anomalyareabuffer and the line vector anomalyareabufferline, all high point area polylines are selected in the high point area according to the value of "RegionType", and the pixel values ​​of all DSM pixels on the polyline are obtained. The coordinates of the center point Top of the pixel corresponding to the maximum value in the plane projection coordinate system are found, and it is determined whether it falls within the scope of the abnormal area. If it does not fall within the scope of the abnormal area, the Top point is determined as the highest DSM value point, and its coordinates are the high point coordinates. If it falls within the scope of the abnormal area, the intersection of the closed boundary line and the current high point area polyline (points C and D) is determined. Assuming that the direction from point C to point D is the direction of the road, the point falling in the abnormal area is point P. At this time, the elevation value of point P is calculated as the high point elevation value. That is, the solution is obtained through spatial analysis. The specific solution process is as follows: Now select the node in the middle of the third road centerline vector after node interpolation, which is the point C1 in front of C and the point D1 behind D that fall outside the abnormal area, and calculate the elevation change rate from C1 to C and the elevation change rate from D1 to D. For the DSM pixels between C and D, first linearly interpolate the fitted elevation EA of each DSM pixel passed by the high point area polyline according to the elevation change rate from C1 to C, and then linearly interpolate the fitted elevation EB of each DSM pixel passed by the high point area polyline according to the elevation change rate from D1 to D. For each DSM pixel, calculate the average value of EA and EB, and take the pixel with the largest average value as the highest elevation point in the current high point area, that is, the elevation value of point P is the average value of EA and EB. It's worth noting that the formula for calculating the rate of elevation change is: ERate = (E2 - E1) / NP, where ERate represents the rate of elevation change, E2 is the elevation of the endpoint, E1 is the elevation of the starting point, and NP represents the number of pixels between the starting and ending points. Furthermore, nodes C, C1, D, D1, and P are all within the centerline entity of the third road centerline vector after node interpolation. Nodes C, C1, D, and D1 are not within the abnormal area. Nodes C and D are on the closed boundary line. Point P is between C and D, C is between C1 and P, and D is between D1 and P.

[0089] In the above steps, in order to ensure the accuracy of determining the low point, the specific operation of determining the low point in the low point area is as follows: based on the point vector Point1, the low point area line vector LineTopBottomRegion, the DSM raster data, the abnormal area buffer surface vector anomalyareabuffer and the line vector anomalyareabufferline, in the low point area, according to the value of "RegionType", all low point area polylines are selected, and the pixel values ​​of all DSM pixels on the polyline are obtained. The coordinates of the minimum value corresponding to the pixel center point Bottom in the plane projection coordinate system are found to determine whether it falls within the range of the abnormal area. If it does not fall within the range of the abnormal area, it is determined to be the lowest point of the DSM value under the current low point area polyline, and its coordinates correspond to the low point coordinates. If it falls within the range of the abnormal area, the lowest point of the low point area is determined according to the spatial analysis method. The specific determination method is the same as the method for determining the high point in the high point area, so it will not be repeated here.

[0090] In this embodiment, after determining the high and low points, a perpendicular line is drawn to the centerline entity of the third road centerline line vector after node interpolation using the coordinates of the high and low points. If the perpendicular line falls in the middle of the road segment formed by two adjacent nodes, the perpendicular line is the slope change point. If the foot of the perpendicular line falls on the extension line of the road segment formed by the two adjacent nodes, the endpoint node of the road segment closest to the foot of the perpendicular line is the slope change point. The elevation of the slope change point is equal to the elevation of the corresponding high or low point. After determining the slope change point, the "distance to the beginning of the line" and "distance to the end of the line" are calculated from the slope change point to the beginning node of the centerline entity of the third road centerline line vector after interpolation of the node where the slope change point is located. If the "distance to the beginning of the line" value is less than a given threshold DT, or the "distance to the end of the line" value is less than a given preset first distance, the slope change point is deleted to avoid the situation where the distance between the centerline entity of the third road centerline line vector after node interpolation is too short, resulting in inaccurate slope calculation.

[0091] It's worth noting that when the fast and slow moving average curves intersect in the same way that the fast moving average crosses the slow moving average from top to bottom, it indicates a high point; when the fast and slow moving average curves intersect in the same way that the fast moving average crosses the slow moving average from bottom to top, it indicates a low point. The fast moving average curve can more quickly reflect elevation changes than the slow moving average curve. After determining the intersection of the fast and slow moving average curves, count T2 points forward from the intersection and select the T2th point and the road segment at the intersection from the midline entity of the third road centerline after node interpolation as the high point or low point area. That is, when the fast moving average curve crosses the slow moving average area from top to bottom, it corresponds to a high point area, and when the fast moving average curve crosses the slow moving average area from bottom to top, it corresponds to a low point area. In addition, after determining the high point area or the low point area, based on its corresponding coordinate position, determine whether the distance from the two end points of the high point area or the low point area to the head node of the midline entity of the third road centerline line vector after node interpolation is less than the preset threshold value dist_thresh or / and determine whether the distance from the two end points of the high point area or the low point area to the tail node of the midline entity of the third road centerline line vector after node interpolation is less than the preset threshold value dist_thresh. If so, discard the area and re-determine the high point area or / and the low point area.

[0092] Step 203: interrupt the line entity in the second road centerline line vector based on the slope change point to obtain the line entity in the fourth road centerline line vector.

[0093] In this step, the fourth road centerline line vector is a vector, and the line entities stored in the fourth road centerline line vector are formed after the line entity in the corresponding second road centerline line vector is interrupted by the slope change point. That is, a line entity in the original second road centerline line vector is interrupted to form multiple line entities, which are stored in the fourth road centerline line vector. The method of obtaining the entity in the fourth road centerline line vector by interrupting the line entity in the second road centerline line vector by the slope change point is the same as the method of obtaining the fourth road centerline line vector by interrupting the line entity in the second road centerline line vector by the slope change point in Example 1. After the line entity in the second road centerline line vector is interrupted by the slope change point, the slope change trend of the line entity in the fourth road centerline line vector is consistent, that is, the slope trend of the line entity in the fourth road centerline line vector can be uphill, downhill, or flat. By using the aforementioned slope change points to break up the midline entity of the second road centerline vector, we obtain the line entities in the fourth road centerline vector. This ensures that each line entity in the fourth road centerline vector has only one slope trend. This prevents inaccurate slope calculations based on the endpoints of the midline entity in the fourth road centerline vector when both upslope and downslope occur within the same line entity in the fourth road centerline vector. This method of using slope change points to segment the slope refines the range of slope calculation and ensures slope accuracy. This will not be further elaborated here.

[0094] Step 204: Calculate the road slope of each line entity in the fourth road centerline vector data based on the slope change point and the elevation value.

[0095] In this step, a spatial analysis method is used to determine the point where the starting node position of the centerline entity of the fourth road centerline line vector coincides with the position data of the slope change point, and the elevation value of the slope change point is determined to be the elevation value of the starting node position of the centerline entity of the fourth road centerline line vector. The point where the tail node position of the centerline entity of the fourth road centerline line vector coincides with the position data of the slope change point is determined, and the elevation value of the slope change point is determined to be the elevation value of the tail node position of the centerline entity of the fourth road centerline line vector. The elevation value of the starting node and the elevation value of the tail node are used to determine the elevation difference of the centerline entity of the fourth road centerline line vector. The position coordinates of the starting node and the tail node are used to determine the distance between the starting node and the tail node in the centerline entity of the fourth road centerline line vector. At this time, the slope of the centerline entity of the fourth road centerline line vector is elevation difference / distance*100%.

[0096] It is worth noting that after the third road centerline line vector entity is interpolated from the second road centerline line vector entity node, how to determine the slope change point based on the third road centerline line vector entity after node interpolation, and then determine the slope accuracy of the fourth road centerline line vector entity. If there is at least one third road centerline line vector entity whose length is less than or equal to the first threshold, the above Figure 2The implementation method of the embodiment can still calculate the slope change point in the centerline entity of the third road centerline line vector, and can also determine the road slope of the line entity of the fourth road centerline line vector. That is, the specific process is the same. Here, when the length of the centerline entity of the third road centerline line vector is less than or equal to the first threshold, how to determine the slope of the centerline entity of the fourth road centerline line vector is not repeated.

[0097] Based on the above Figure 2 The embodiment of the present invention is to take the road slope extraction of the main road in the mountainous area of ​​Mentougou District, Beijing as an example to illustrate the above embodiment. Figure 3 As shown:

[0098] Step 301: Obtain data related to the study area.

[0099] In this embodiment, the data related to the study area obtained includes high-spatial-resolution first digital surface model (DSM) raster data and first digital orthophoto image data covering the study area. The first DSM raster data is obtained from high-resolution, high-precision DSM raster data covering the study area. This data is obtained using stereo images of the Beijing-3 satellite covering the mountainous area of ​​Mentougou District, Beijing. This data is automatically generated using photogrammetry to produce DSM raster images with a sampling interval of 0.3 meters. The DSM uses a Gaussian 2000 coordinate system. First and second road centerline line vector data can be extracted from the first DSM raster data. The position data for the first and second road centerline line vector data is obtained from high-spatial-resolution DOM images covering the study area. This is obtained from Beijing-3 satellite images covering the mountainous area of ​​Mentougou District, Beijing. The necessary preprocessing, including orthorectification, fusion, mosaicking, and color grading, is performed to produce a 0.3-meter-resolution DOM image covering the study area. Roads in the study area are extracted based on the DOM data.

[0100] Step 302: interpolate the second road centerline vector nodes and correct the abnormal DSM values ​​at the corresponding positions of the nodes. The first threshold is set to 10 meters.

[0101] After obtaining the second road centerline line vector data for the study area, determine whether the spacing between adjacent nodes in the line entity of the second road centerline line vector data is greater than 10 meters. If so, create a new node every 10 meters and add it to the line entity of the second road centerline line vector data to obtain the line entity of the third road centerline line vector data after node interpolation. If not, proceed to the next calculation. For the third road centerline line vector, obtain the planar projection coordinates of each node. Based on these coordinates, generate a point vector Point1. Create the attribute fields "Line_ID," "Distance to Line Start," and "Distance to Line End" for Point1 and assign corresponding values ​​according to the method described in the technical solution section of this invention. After determining the point vector Point1 and the DSM raster map, add the "Elevation" and "Slope" fields to Point1. Fill the "Elevation" field with the pixel value of the DSM raster map corresponding to the point location. Calculate the slope of the line connecting the "Elevation" field values ​​of the two adjacent points and fill it in the "Slope" field of the latter point. If the "Slope" field value of a point is greater than T or less than -T, the point is determined to be an elevation anomaly point. The calculation method of "Slope" is as follows:

[0102] Assuming that the coordinates of the two points before and after are (x1, y1) and (x2, y2) respectively, when x1≠x2, the slope k is calculated as follows: k = (y2-y1) / (x2-x1). When x1 = x2, the straight line formed by the two points before and after is parallel to or coincides with the y-axis, and the slope does not exist. Here, a large value of 99999 is used to indicate this. Use the average elevation of the two points before and after the outlier to replace the elevation of the outlier and fill in the "Elevation" field; if it is the first point on the road line, use the elevation value of the next point instead; if it is the last point on the road line, use the elevation value of the previous point instead. Use a loop to perform the above replacement process until there is no case where the "Slope" field value is greater than T or less than -T. Since this step is modified on the point vector Point1, the output result is still the point vector Point1.

[0103] In the point vector Point1 obtained in the previous step, the "elevation" field value corresponding to the point falling within the range of the abnormal area surface vector may still be an abnormal value. Therefore, the location data of the abnormal area, that is, the abnormal area surface vector, is obtained based on the first digital orthophoto raster data. The abnormal area surface vector anomalyarea is buffered outward by a distance of the size of a pixel to obtain the surface vector anomalyareabuffer. The surface vector anomalyareabuffer is converted into a closed line vector anomalyareabufferline. The third road centerline line vector and the line vector anomalyareabufferline are spatially intersected to obtain two intersection points, and the DSM values ​​of the two intersection points are obtained. The DSM values ​​of the two intersection points are used to interpolate the elevation values ​​of the points in the point vector Point1 that fall within the abnormal area surface vector anomalyarea using the linear interpolation method, replacing the original "elevation" field value.

[0104] Step 303: Locate the slope change point based on the fast and slow moving average curves.

[0105] In this step, based on the point vector Point1 and the third road centerline line vector data, create new attribute fields "M1" and "M2" in the point vector. At this time, fill the average value of the elevation values ​​of 5 consecutive nodes into the "M1" of the last node of these 5 consecutive nodes, until all the nodes "M1" are calculated and filled in. Fill the average value of the elevation values ​​of 10 consecutive nodes into the "M2" of the last node of these 10 consecutive nodes, until all the nodes "M2" are calculated and filled in. At this point, the values ​​of the "MA1" field are sequentially connected to form the curve MA1, that is, the fast moving average curve, and the values ​​of the "MA2" field are sequentially connected to form the curve MA2, that is, the slow moving average curve. And according to the intersection of the two curves, the high point area and the low point area are determined, and according to the above method, the highest point is determined in the high point area and the lowest point is determined in the low point area. According to the perpendicular foot of the high point and the low point to the road line, it is determined as the slope change point. The specific judgment method for determining the high point area and the low point area in this step is as follows:

[0106] When (MA1[i-2]>=MA2[i-2])and(MA1[i-1]>MA2[i-1])and(MA1[i]<=MA2[i]), it is determined that the fast moving average curve crosses below the slow moving average curve. The area determined at this time is the high point area. In the above calculation formula, i is the point with serial number i, and i>=3.

[0107] When(MA1[i-2] <MA2[i-2])and(MA1[i-1]<MA2[i-1])and(MA1[i]> =MA2[i]) At this time, it is determined that the fast moving average curve crosses the slow moving average curve. The area determined at this time is the low point area. In the above calculation formula, i is the point with serial number i, and i>=3.

[0108] Among them, MA1[i] and MA2[i] represent the MA1 value and MA2 of the i-th point respectively; MA1[i-1] and MA2[i-1] represent the MA1 value and MA2 of the i-1-th point respectively; MA1[i-2] and MA2[i-2] represent the MA1 value and MA2 of the i-2-th point respectively.

[0109] After determining the slope change point, calculate the line start distance from the slope change point to the starting node of the middle line entity of the second road centerline vector and the line end distance to the road end node. When the line start distance or line end distance is less than 10 meters, delete the slope change point to avoid the road being too short interrupted by the slope change point, resulting in inaccurate road slope.

[0110] Step 304 : The slope change point interrupts the second road centerline vector midline entity, and calculates the road slope of the fourth road centerline vector midline entity after the second road centerline vector midline entity is interrupted.

[0111] In this step, the slope change points interrupt the second road centerline vector midline entity to obtain multiple road segments, namely the fourth road centerline vector midline entity. After the road is interrupted by the slope change points, the slope change trend of the fourth road centerline vector midline entity obtained is consistent, that is, the slope trend of the fourth road centerline vector midline entity is one, which can be upslope, downslope, or flat slope. This will not be further described here.

[0112] In this step, using spatial analysis, the "Elevation" field value is obtained from the slope change point that coincides with the starting endpoint of each road segment in the fourth road centerline line vector and entered into the "Starting Elevation" field. The "Elevation" field value is obtained from the slope change point that coincides with the ending endpoint of each road segment in the fourth road centerline line vector and entered into the "Ending Elevation" field. The elevation difference of each road segment is calculated using the following formula and entered into the "Elevation Difference" field of the fourth road centerline line vector. Here, Elevation Difference = the value of the "Starting Elevation" field - the value of the "Ending Elevation" field. The distance of each road segment is calculated using the following formula and entered into the "Distance" field of the fourth road centerline line vector.

[0113]

[0114] Among them, L represents the length of the road section, i represents the node number on the current road section, n represents the number of points, and x i and yi Represents the horizontal and vertical coordinates of the i-th node, x i-1 and y i-1 Represent the horizontal and vertical coordinates of the i-1th node respectively.

[0115] Calculate the slope of each road section according to the following formula and fill in the "Slope" field of the fourth road centerline vector.

[0116] Slope of the road segment = "elevation difference" field value / "distance" field value * 100%

[0117] Furthermore, as a response to the above Figure 1-3 The implementation of the method embodiment shown in the figure, the embodiment of the present invention also provides a road slope calculation device based on a digital surface model, which is used to automatically and accurately determine the slope change point, and based on the slope change point, split the second road centerline line vector midline entity to form multiple fourth road centerline line vector midline entities, and then determine the slope of the road section with the same change trend, thereby completing the extraction of the road angle. The embodiment of this device corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 4 As shown,

[0118] An input acquisition unit 41 is used to acquire first digital surface model raster data and first digital orthophoto raster data of a study area with high spatial resolution;

[0119] The input acquisition unit 41 is used to acquire first road surface vector data and first road centerline vector data according to the first digital orthophoto raster data;

[0120] The input acquisition unit 41 generates a road intersection point vector based on the first road centerline line vector data, and breaks the first road centerline line vector according to the road intersection point vector to obtain a second road centerline line vector;

[0121] a node interpolation and elevation acquisition unit 42 for performing node interpolation on each line entity in the second road centerline line vector data inputted into the acquisition unit 41 to obtain third road centerline line vector data;

[0122] The node interpolation and elevation acquisition unit 42 is configured to determine the elevation value of each node in the third road centerline vector data based on the first digital surface model raster data input by the acquisition unit 41;

[0123] a slope change point determination unit 43 for finding a slope change point on the third road centerline vector data of the node interpolation and elevation acquisition unit 42 using a moving average curve;

[0124] A slope calculation unit 44 is configured to interrupt the line entity in the second road centerline line vector input to the acquisition unit 41 according to the slope change point in the slope change point determination unit 43 to obtain a fourth road centerline line vector;

[0125] The slope calculation unit 44 is configured to calculate the road slope of each line entity in the fourth road centerline line vector by using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the fourth road centerline line vector.

[0126] Further, such as Figure 5 As shown, the node interpolation and elevation acquisition unit 42 includes:

[0127] An abnormal area acquisition module 421 is configured to acquire location data of an abnormal area based on the first digital orthophoto raster data, wherein the abnormal area is an area formed by an object blocking the third road centerline line vector;

[0128] A position determination module 422 is configured to determine whether a node in the middle line entity of the third road centerline vector is located in the abnormal area based on the position data of the abnormal area obtained by the abnormal area acquisition module 421;

[0129] a node elevation determination module 423 configured to determine, if the node in the third road centerline vector midline entity in the position determination module 422 is located within the abnormal area, determine the node that is not located within the abnormal area based on the position data of the abnormal area and the position data of the node;

[0130] The node elevation determination module 423 is configured to determine the elevation values ​​of the road points located in the abnormal area using a linear interpolation method based on the position data of the nodes not located in the abnormal area and the first digital surface model raster data.

[0131] Further, such as Figure 5 As shown, the device further includes a height abnormal point determination unit 45, and the height abnormal point determination unit 45 includes:

[0132] The slope calculation module 451 calculates the slope of the line connecting the elevation values ​​of adjacent nodes in the centerline entity of the third road centerline vector data;

[0133] The elevation abnormal point determination module 452 is configured to determine the latter point among the adjacent road points as an elevation abnormal point when the slope calculated by the slope calculation module 451 is not within a preset slope range;

[0134] The elevation abnormal point determination module 453 is used to determine the elevation value of the elevation abnormal point according to the average elevation value of the road points connected between the elevation abnormal points.

[0135] Further, such as Figure 5 As shown, the slope change point determination unit 43 includes:

[0136] A moving curve establishing module 431 is configured to establish a first moving average curve and a second moving average curve according to the elevation values ​​of the nodes in the third road centerline vector;

[0137] The region and slope change point determination module 432 is configured to determine a high point region and a low point region according to the first moving average curve and the second moving average curve in the moving curve establishment module 431;

[0138] The region and slope change point determination module 432 is configured to determine a slope change point based on the high point region and the low point region.

[0139] Further, such as Figure 5 As shown, the region and slope change point determination module 432 includes:

[0140] The submodule 4321 for determining points within the region is configured to determine a first point within the high point region and a second point within the low point region, wherein the first point is a point with the maximum elevation within the high point region and the second point is a point with the minimum elevation within the low point region;

[0141] The slope change point determination submodule 4322 is configured to obtain the foot of a perpendicular between the first point and the second point in the submodule 4321 within the determination area and the first road, and determine the foot of the perpendicular as the slope change point.

[0142] Further, such as Figure 5 As shown, the region and slope change point determination module 432 further includes:

[0143] The line entity determination submodule 4323 is used to determine the line entity in the line vector of the third road centerline where the slope change point is located;

[0144] The distance calculation submodule 4324 is used to calculate the distance from the slope change point to the start and end nodes of the line entity of the third determination submodule 4323 to determine the distance to the beginning and end of the line;

[0145] The slope change point deletion submodule 4325 is configured to delete the slope change point if the distance from the calculation submodule 4324 to the line start or the distance to the line end is less than a preset first distance.

[0146] Further, such as Figure 5 As shown, the slope calculation unit 44 includes:

[0147] a distance determining module 441 for determining the distance of the fourth road centerline line vector based on the position data of the two end points of each line entity of the fourth road centerline line vector;

[0148] An elevation difference determination module 442 is configured to determine an elevation difference between the two endpoints based on the position data of the two endpoints of each line entity of the fourth road centerline line vector generated by the distance determination module 441;

[0149] The slope determination module 443 is configured to determine the road slope of each line entity in the fourth road centerline line vector by taking the percentage of the elevation difference determined by the elevation difference determination module 442 and the distance ratio in the distance determination module 441 as an example.

[0150] Furthermore, an embodiment of the present application also provides a computing device, the computing device comprising: at least one processor, and a memory, wherein the memory stores instructions that can be executed by the processor, and the instructions are executed by the processor, so that the processor can perform the above-mentioned Figure 1-3 The road slope calculation method based on digital surface model is described in.

[0151] Furthermore, an embodiment of the present application further provides a readable storage medium, wherein the readable storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above-mentioned Figure 1-3 The road slope calculation method based on digital surface model is described in.

[0152] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] It is understood that the relevant features of the above methods and devices can be referenced to each other. In addition, the terms "first" and "second" in the above embodiments are used to distinguish between the embodiments, and do not represent the advantages and disadvantages of the embodiments.

[0154] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0155] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing this type of system. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of the present invention.

[0156] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0157] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0158] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0159] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0161] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0162] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0163] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0164] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0165] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A road slope calculation method based on a digital surface model, characterized in that: include: Obtaining first digital surface model raster data and first digital orthophoto map raster data with high spatial resolution in the study area; Acquire first road surface vector data and first road centerline vector data based on the first digital orthophoto raster data; generating a road intersection point vector according to the first road centerline line vector data, and breaking the first road centerline line vector according to the road intersection point vector to obtain second road centerline line vector data; Performing node interpolation on each line entity in the second road centerline line vector data to obtain third road centerline line vector data; determining, based on the first digital surface model raster data, an elevation value of each node in the third road centerline vector data; Using a moving average curve, finding a slope change point that falls on the centerline vector data of the third road; Interrupting the line entity in the second road centerline line vector data according to the slope change point to obtain fourth road centerline line vector data; The road slope of each line entity in the fourth road centerline line vector data is calculated using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the fourth road centerline line vector data.

2. The method according to claim 1, characterized in that The step of determining the elevation value of each node in the third road centerline vector data based on the first digital surface model raster data includes: Acquire location data of an abnormal area based on the first digital orthophoto raster data, where the abnormal area is an area formed by an object blocking a line vector of a third road centerline; Based on the position data of the abnormal area, determining whether a node within the middle line entity of the third road centerline vector is located in the abnormal area; If yes, determining the nodes that are not in the abnormal area based on the location data of the abnormal area and the location data of the node; Based on the position data of the nodes not in the abnormal area and the first digital surface model raster data, the elevation values ​​of the nodes in the abnormal area are determined by using a linear interpolation method.

3. The method according to claim 2, characterized in that Before determining the elevation values ​​of the nodes located in the abnormal area by using a linear interpolation method based on the position data of the nodes not located in the abnormal area and the first digital surface model raster data, the method further includes: Calculating the slope of a line connecting adjacent node elevation values ​​within a centerline entity of the third road centerline vector data; When the slope is not within the preset slope range, determining the latter point among the adjacent road points as an elevation anomaly point; The elevation value of the elevation abnormal point is determined according to the average elevation value of adjacent road points between the elevation abnormal points.

4. The method according to claim 1, wherein The step of finding the slope change point on the centerline vector data of the third road by using the moving average curve includes: Establishing a first moving average curve and a second moving average curve according to the elevation values ​​of the nodes in the third road centerline line vector; Determining a high point area and a low point area according to the first moving average curve and the second moving average curve; A slope change point is determined based on the high point area and the low point area.

5. The method according to claim 4, characterized in that The determining of the slope change point based on the high point area and the low point area includes: Determine a first point in the high point area and a second point in the low point area, wherein the first point is a point with a maximum elevation value in the high point area, and the second point is a point with a minimum elevation value in the low point area; Obtain the foot of a line entity from the first point and the second point to the third road centerline line vector data, and determine the foot of the line entity as a slope change point.

6. The method according to claim 5, characterized in that After obtaining the foot of a line entity from the first point data and the second point data to the third road centerline line vector data and determining the foot of the line entity as a slope change point, the method further includes: Determine a line entity in a third road centerline line vector where the slope change point is located; Calculating the distances from the slope change point to the start and end nodes of the line entity to determine the distance to the beginning and the distance to the end of the line; If the distance to the beginning of the line or the distance to the end of the line is less than a preset first distance, the slope change point is deleted.

7. A road slope calculation device based on a digital surface model, characterized in that: include: An input acquisition unit is used to acquire first digital surface model raster data and first digital orthophoto map raster data with high spatial resolution of the study area; The input acquisition unit is used to acquire first road surface vector data and first road centerline vector data based on the first digital orthophoto raster data; The input acquisition unit generates a road intersection point vector based on the first road centerline line vector data, and breaks the first road centerline line vector according to the road intersection point vector to obtain a second road centerline line vector; a node interpolation and elevation acquisition unit, configured to perform node interpolation on each line entity in the second road centerline line vector data input into the acquisition unit to obtain third road centerline line vector data; The node interpolation and elevation acquisition unit is configured to determine the elevation value of each node in the third road centerline line vector data based on the first digital surface model raster data input to the acquisition unit; a slope change point determination unit, configured to use a moving average curve to find a slope change point that falls on the third road centerline line vector data of the node interpolation and elevation acquisition unit; a slope calculation unit, configured to interrupt the line entity in the second road centerline line vector of the input acquisition unit according to the slope change point in the slope change point determination unit to obtain fourth road centerline line vector data; The slope calculation unit is used to calculate the road slope of each line entity in the fourth road centerline line vector data by using the plane projection coordinates and elevation values ​​of the two end points of each line entity in the fourth road centerline line vector data.

8. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the road slope calculation method based on the digital surface model according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that The storage medium is used to store a computer program, wherein when the computer program is running, it controls the device where the storage medium is located to execute the road slope calculation method based on a digital surface model according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Water and soil coupling landslide simulation method based on high-order double-set double-phase material point method

    CN110008599A

  • Road track checking method based on high-resolution remote sensing image

    CN110619258A