Road slope calculation method and device based on digital surface model
Through the road slope calculation method based on the digital surface model, the road slope data is automatically extracted using the digital surface model with high spatial resolution and the orthophotogram data, which solves the problem of inaccurate road slope in the prior art, and realizes high-precision slope calculation in large areas.
Patent Information
- Application Number
- CN202411984651.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The prior art is difficult to obtain high-precision and high spatial resolution road slope data, especially in large-area applications, resulting in inaccurate road slope.
The road slope calculation method based on the digital surface model is adopted, and the road slope data is automatically extracted by obtaining the high-spatial resolution digital surface model raster data and digital orthophotogram raster data of the study area. The specific steps include obtaining the road center line vector data, interpolation of nodes, determining the elevation value, using the moving average curve to find the slope point, breaking the line vector, and calculating the road slope.
It realizes accurate and automatic extraction of road slope data in large areas and large scenarios, avoiding the problem of inaccurate slope calculation caused by low-resolution DEM data.
Smart Images

Figure CN119879847A_ABST
Abstract
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 fields has become increasingly prominent. As one of the key elements of roads, road slope plays a vital role in ensuring traffic safety and facilitating route planning.
[0003] In the prior art, 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 the 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-area applications, high-precision and high-spatial-resolution DEM data is difficult to obtain and has poor update timeliness, so it is difficult to apply in engineering. The method of calculating road slope based on low-resolution DEM 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 slope of the roads in the study area will be inaccurate. Summary of the invention
[0005] The embodiment of the present application provides a method for calculating road slope based on a digital surface model, the purpose of which is to determine a practical technical solution that is applicable to large-area and large-scene research areas and can accurately and automatically extract road slopes.
[0006] In order 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 the first digital surface model raster data and the first digital orthophoto raster data with high spatial resolution in the study area;
[0009] Acquire first road surface vector data and first road centerline vector data according to the first digital orthophoto raster data;
[0010] Generate a road intersection point vector according to 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;
[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] Determine the elevation value of each node in the third road centerline line vector data based on the first digital surface model raster data;
[0013] Using a moving average curve, finding a slope change point that falls on the centerline vector data of the third road;
[0014] Interrupt 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 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.
[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 in a research area;
[0018] The input acquisition unit is used to acquire first road surface vector data and first road centerline vector data according to the first digital orthophoto raster data;
[0019] The input acquisition unit generates a road intersection point vector according to the first road center line line vector data, and interrupts the first road center line line vector according to the road intersection point vector to obtain a second road center line line vector;
[0020] A node interpolation and elevation acquisition unit, used for performing node interpolation on each line entity in the second road centerline line vector data in the input acquisition unit to obtain third road centerline line vector data;
[0021] The node interpolation and elevation acquisition unit is used 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 of the input acquisition unit;
[0022] A slope change point determination unit, used for finding the slope change point falling on the third road centerline line vector data of the node interpolation and elevation acquisition unit by using a moving average curve;
[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 by 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 used to call program instructions in the memory to execute the above-mentioned road slope calculation method based on the digital surface model.
[0026] In a fourth aspect, the present application provides a storage medium, a readable storage medium, wherein the 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 road slope calculation method based on the digital surface model.
[0027] By means of the above technical scheme, the present application provides a method and device for calculating the road slope based on a digital surface model. The scheme is automatically executed according to the established steps. First, the first digital surface model raster data and the first digital orthophoto raster data of the study area with high spatial resolution are obtained. According to the first digital orthophoto raster data, the first, second and third road centerline line vector data are further obtained. 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 point. Finally, the fourth road centerline line vector data is determined based on the line entity in the second road centerline line vector interrupted by 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 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, and 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] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. 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 a road slope based on a digital surface model proposed in one embodiment of the present application is shown;
[0030] Figure 2 A flow chart 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 a road slope based on a digital surface model proposed in another embodiment of the present application is shown;
[0032] Figure 4A schematic diagram of the structure of a road slope calculation device based on a digital surface model provided by an 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 exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the 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. On the contrary, these embodiments are provided in order 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 terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0036] With the continuous development of human society, in the existing technology, it is usually necessary to use a digital elevation model to obtain relevant information of roads in the study area, that is, to use the elevation value of the road information in the DEM grid to calculate the road slope of the road in the grid, and determine the road slope of the roads in the study area based on the road slopes of all grid roads. However, it is very difficult to obtain a large-scale high-precision and high-spatial-resolution DEM. Generally, only DEMs with lower resolutions 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 the present 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 comprises the following steps: performing node interpolation on each line entity in the first digital surface model raster data to obtain the 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 the moving average curve; interrupting the line entity in the second road centerline line vector data according to the slope change point to obtain the fourth road centerline line vector data; 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 end points 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 calculating the road slope according to the grid resolution, ensuring the accuracy of the road slope calculation, and thus ensuring the correctness of the road slope.
[0038] A road slope calculation method based on a digital surface model in an embodiment of the present application has the following specific steps: Figure 1 As 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 orthorectification, fusion, mosaicking, color uniformity and other operations to obtain the first digital surface model raster data and the first digital orthophoto map raster data with high spatial resolution in the study area. The first digital surface model raster data represents the elevation information of each geographical location in the study area. This raster data can be obtained by obtaining stereo images through Beijing-3 series satellites, WorldView-3 satellites, etc., or automatically obtained through methods such as laser radar satellite point cloud and airborne laser point cloud. 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: Acquire first road surface vector data and first road centerline vector data according to 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 first digital orthophoto raster data and the color and texture of the object. The first road surface vector data refers to the surface vector data expressing the road in the area surrounded by polygons, and the first road centerline line vector data refers to the line vector data expressing the road in the center line 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 abnormal area data is surface vector data.
[0043] Step 103: Generate a road intersection point vector according to 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 the first road centerline line vector is obtained in step 102, the road intersection point vector is determined according to the number of times the node coordinates of the line entity in the first road centerline line vector appear, and the first road centerline line vector is interrupted by the road intersection point vector to obtain the second road centerline line vector. If the (x, y) coordinate pair constituting the line entity appears 2 or more times in the first road centerline line vector, the position of the coordinate pair is the road intersection, and the point vector generated according to the position is the road intersection point vector. One line entity in the first road centerline line vector data corresponds to multiple line entities in the second road centerline line vector data.
[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 line entity of the second road centerline is judged, that is, whether the distance between two adjacent nodes of the line entity of the second road centerline is greater than or equal to the first threshold interval. If so, a node is inserted according to the distance of each interval of the first threshold interval. Specifically, the distance between adjacent nodes in the line entity of the second road centerline is obtained. If the distance is greater than or equal to the first threshold interval, a node is added to the line vector of the third road centerline according to the distance of each interval of the first threshold interval, so as to obtain the third road centerline line vector after node interpolation encryption. The unique identification field value of the line entity of this node is equal to the unique identification field value of the line entity of the head end node of the road. By performing node interpolation on the line entity of the second road centerline line vector whose distance between two adjacent nodes is greater than the first threshold interval, the inaccurate calculation of the slope caused by the excessive spacing between adjacent nodes of the line entity in the third road centerline line vector can be avoided. By dividing it according to the first threshold, the granularity of the third road centerline line vector data obtained according to 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 length; (2) On the basis of ensuring that (1) is met, the interval value should be as large as possible to avoid too dense interpolation points affecting the 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 you should consider 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 the coordinates. Create the attribute fields "Line_ID", "distance to the beginning of the line" and "distance to the end of the line" for the point vector Point1, and assign corresponding values. Among them, the value of "Line_ID" is equal to the value of "Line_ID" in the corresponding third road centerline line vector. Among them, the specific calculation formulas of "distance to the beginning of the line" and "distance to the end of the line" are:
[0051]
[0052] L1=L-L0
[0053] In the above formula, L0 represents the "distance to the beginning of the line" of the current point, i represents the point number, which corresponds to the order number of the node in the line vector of the third road centerline, starting from 1, n represents the order number of the current point, and x i and i Respectively represent the horizontal and vertical coordinates of the i-th point, x i-1 and 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 grid map, add the "elevation" field and "slope" to the point vector Point1, and fill in the pixel value of the DSM grid map corresponding to the point position in the "elevation" field. Calculate the slope of the line connecting the "elevation" field values of the two adjacent points, and fill in the "slope" field of the latter point of the two adjacent points. 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:
[0055] Assuming that the coordinates of the two points before and after are (x1, y1) and (x2, y2) respectively, when x1≠x2, the calculation formula of the slope k is 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 99999 is used to indicate it. Use the average elevation of the two points before and after the abnormal point to replace the elevation of the abnormal point and fill in the "Elevation" field; if it is the first point on the road line, replace it with the elevation value of the next point; if it is the last point on the road line, replace it with the elevation value of the previous point. 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.
[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 according to the raster data of the first digital orthophoto map, and the abnormal area surface vector anomalyarea is buffered outward by a distance of a pixel size 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 intersected in space 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 line vector data of the third road centerline.
[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 line 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: according to the elevation value of the node in the third road centerline line vector data, establish the first moving average curve and the second moving average curve; according to the first moving average curve and the second moving average curve, determine the high point area and the low point area, 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, determine the slope change point. Specifically:
[0060] According to the point vector Point1, create new fields "MA1" and "MA2", calculate the moving average of the final elevation value of the point vector Point1 for every T1 consecutive points, add this average value to the attribute field M1 of the last node among the N1 nodes, obtain the moving average of every T2 consecutive points, add this average value to the attribute field M2 of the last node among the N2 nodes, where N1 is less than N2, and connect the field values of M1 and M2 in sequence to form the first moving average curve and the second moving average curve. According to whether the first moving curve and the second moving curve intersect and the intersection method, determine the high point area and the low point area, determine the first point in the high point area and the second point in the low point area, the first point is the point with the largest elevation value in the high point area, and the second point is the point with the smallest elevation value in the low point area, obtain the foot of the perpendicular from the first point and the second point to the centerline entity of the third road centerline line vector, and determine the foot of the perpendicular 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 the slope change point is determined in step 106, the line entity in the second road centerline line vector is interrupted by the slope change point to obtain the fourth road centerline line vector data. The specific implementation method is: according to 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, that is, 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 by the slope change point of the actual road change, so as to ensure that the slope change trend in the line entity of the fourth road centerline line vector is consistent, and to prevent the occurrence of both upslope and downslope in the same road segment, thereby ensuring the accuracy of the calculated road slope.
[0063] Before using the slope changing point to interrupt the line entity of the center line vector of the second road, it is also judged whether the length from the beginning node to the end node of the line entity of the center line vector of the fourth road after the interruption is too short when the slope changing point interrupts the line entity of the center line vector of the second road, that is, the distance from the beginning node and the end node of the line entity of the center line vector of the third road from the slope changing point is judged. If this distance is less than the preset first distance value DT, the slope changing point is deleted. The preset first distance is a distance value set according to actual application, and its specific value is not limited here. This step prevents the line entity of the center line vector of the fourth road determined according to the slope changing 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 head node and tail 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 grid 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 the fourth road centerline line vector is determined in step 107, the spatial analysis method is used to obtain the "elevation" field value from the slope change point that coincides with the first endpoint position of each road line segment in the fourth road centerline line vector, and fill it into the "starting point elevation" field; the "elevation" field value is obtained from the slope change point that coincides with the last endpoint position of each road line segment in the fourth road centerline line vector, and fill it into the "end elevation" field. The elevation difference of each road segment is calculated according to the following formula, and filled in the "elevation difference" field of the fourth road centerline line vector. Among them, elevation difference = value of the "starting point elevation" field - value of the "end elevation" field. The distance of each road segment is calculated according to the following formula and filled in the "distance" field of the fourth road centerline line 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 i Respectively represent the horizontal and vertical coordinates of the i-th node, x i-1 and 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 line vector.
[0070] Slope of the road segment = "elevation difference" field value / "distance" field value * 100%
[0071] Based on the above Figure 1It can be seen from the implementation method that this application provides a road slope calculation method based on a digital surface model. The scheme is automatically executed according to the established steps. First, the first, second, and third road centerline line vectors are determined based on the first digital surface model raster data and the first digital orthophoto map raster data with high spatial resolution in the study area. 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 value is processed using a moving average curve to accurately determine the slope change point. 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 of 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 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 the road slope data according to a predetermined distance is inaccurate, and 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, 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.
[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 centerline entity, and the distance between adjacent nodes of the second road centerline line vector centerline entity is greater than the first threshold, a node is inserted after the second road centerline line vector centerline entity at a distance of the first threshold to form a third road centerline line vector centerline entity after node interpolation. In this case, how to determine the slope change point based on the third road centerline line vector centerline entity after node interpolation, and then determine the slope of the road. The embodiment of the present application will give a more detailed description, specifically as follows Figure 2 As shown, including:
[0073] Step 201: Determine the elevation values of nodes in the line entity of the third road centerline line vector after node interpolation based on the position data of the line entity in the third road centerline line vector after node interpolation and the first digital surface model raster data.
[0074] In this step, for the third road centerline line vector after node interpolation, the plane projection coordinates of each node are obtained, and the point vector Point1 is generated according to the coordinates. The attribute fields "Line_ID", "distance to the beginning of the line" and "distance to the end of the line" are established for the point vector Point1, and corresponding values are assigned. Among them, the value of "Line_ID" is equal to the value of "Line_ID" in the third road centerline line vector after the corresponding node interpolation. Among them, the specific calculation formulas of "distance to the beginning of the line" and "distance to the end of the line" are:
[0075]
[0076] L1=L-L0
[0077] In the above formula, L0 represents the "distance to the beginning of the line" of the current point, i represents the point number, which corresponds to the order number of the node in the line vector of the third road centerline, starting from 1, n represents the order number of the current point, and x i and i Respectively represent the horizontal and vertical coordinates of the i-th point, x i-1 and 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 grid map, add the "elevation" field and "slope" to the point vector Point1, and fill in the pixel value of the DSM grid map corresponding to the point position in the "elevation" field. Calculate the slope of the line connecting the "elevation" field values of the two adjacent points, and fill in the "slope" field of the latter point of the two adjacent points. 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.
[0079] The calculation of "slope" is as follows: Assuming that the coordinates of the two points before and after are (x1, y1) and (x2, y2) respectively, when x1≠x2, the calculation formula of slope k is 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 99999 is used to indicate it. Use the average elevation of the two points before and after the abnormal point to replace the elevation of the abnormal point and fill in the "Elevation" field; if it is the first point on the road line, replace it with the elevation value of the next point; if it is the last point on the road line, replace it with the elevation value of the previous point. Use a loop to perform the above replacement process until there is no case where the value of the "slope" field is greater than T or less than -T. Since this step is to modify the point vector Point1, the output result is still the point vector Point1.
[0080] After correcting the point vector Point1, the "elevation" field value corresponding to the point in the corrected point vector Point1 that falls within the range of the abnormal area surface vector may still be an abnormal value. Therefore, the position data of the abnormal area, that is, the abnormal area surface vector, is obtained according to the raster data of the first digital orthophoto map, and the abnormal area surface vector anomalyarea is buffered outward by a distance of a pixel size 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 intersected in space 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 to replace 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 also determined whether the line entity in the line vector of the third road centerline after node interpolation is blocked by an object, that is, the position data of the abnormal area is obtained according to the first digital orthophoto raster data, and the abnormal area is the area formed by the object blocking the line entity in the line vector of the third road centerline after node interpolation; based on the position data of the abnormal area, it is determined whether there is a node in the line entity in the line vector of the third road centerline after node interpolation located in the abnormal area; if so, the nodes that are not in the abnormal area are determined according to the position data of the abnormal area and the position data of the nodes in the line entity in the line vector of the third road centerline after node interpolation; based on the position data of the nodes and the first digital orthophoto raster data, the elevation values of the nodes located in the abnormal area are determined by linear interpolation.
[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 there is a node in the abnormal area in the line entity of the third road centerline line vector after node interpolation, a buffer operation is used to obtain an expanded area according to the position data of the abnormal area, that is, a DSM pixel size distance is buffered outward. At this time, the boundary of the expanded area forms a closed boundary line, and the line entity of the third road centerline line vector after node interpolation is intersected with the closed boundary line space to obtain the position data of the two intersection points, and determine their elevation values in the first digital surface model raster data. The elevation values of the nodes falling in the abnormal area are interpolated by the two-point elevation value combined with the linear interpolation method to replace the original elevation value of the point. It is worth noting that the above-mentioned outward buffering of a DSM pixel size distance refers to buffering in the direction away from the abnormal area at the boundary point of the abnormal area. If the abnormal area is an area determined by the radius of the center point (0, 0) R=N, then the pixel distance is N, then the outward buffering is a buffer of a distance N away from the center of the circle. At this time, the closed line formed by the circular boundary points determined by the radius of the center point (0, 0) 2N is 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 based on the specific positions of points A and B and the elevation values determined in the first digital surface model raster data according to their specific positions and the positions of the nodes falling in the abnormal area using the linear interpolation method.
[0085] It is worth noting that in this step, the first digital surface model raster data represents the surface elevation value 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, the slope change point in the line entity of the third road centerline line vector after node interpolation is determined by using the fast and slow moving average curves.
[0087] After determining the elevation value of the node in the line entity of the third road centerline line vector after node interpolation in step 201, in order to ensure the accuracy of determining the slope change point, the plane projection coordinates of each node of the third road centerline line vector are obtained, and the point vector Point1 is generated according to the coordinates, and the attribute fields "MA1" and "MA2" are established for the point vector Point1, and the moving average value of each consecutive T1 points of the final elevation value of the point vector Point1 is used, and this average value is filled in the "MA1" attribute field of the last point of the consecutive T1 points. The moving average value is calculated for each consecutive T2 points, and this average value is added to the attribute field M2 of the last node of the T2 nodes, where T1 is less than T2, and the field values of M1 and M2 are connected in sequence to form a fast moving average curve and a slow moving average curve. According to whether the fast moving average curve and the slow moving average curve intersect and the intersection method, the high point area and the low point area are determined. At this time, the value of the attribute field "RegionType" is added to distinguish the high point area and the low point area, and the high point is determined in the high point area, and the low point is determined in the low point area. The foot of the perpendicular to the line entity of the third road centerline line vector after interpolation from the high point and the low point to the node is obtained, and the foot of the perpendicular is determined as the slope change point.
[0088] In the above steps, in order to ensure the accuracy of determining the high point, the specific operation of determining the high point 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, select all high point area polylines in the high point area according to the value of "RegionType", and obtain the pixel values of all DSM pixels on the polyline, find out the coordinates of the center point Top of the pixel corresponding to the maximum value in the plane projection coordinate system, and judge whether it falls within the range of the abnormal area. If it does not fall within the range of the abnormal area, then determine that the Top point is the highest point of the DSM value, and its coordinates are the high point coordinates. If it falls within the range of the abnormal area, determine the intersection of the closed boundary line and the current high point area polyline (point C and point D). 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 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 line vector of the third road centerline 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 fitting 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 fitting 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 is worth noting that the calculation formula of the elevation change rate is: ERate = (E2-E1) / NP, where ERate represents the elevation change rate, E2 is the elevation of the end point, E1 is the elevation of the starting point, and NP represents the number of pixels between the starting point and the end point. In addition, the above nodes C, C1, D, D1 and P are all in the middle line entity of the third road centerline line vector after node interpolation, and nodes C, C1, D, D1 are not in the abnormal area, nodes C and D are on the closed boundary line, 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: 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, select all low point area polylines in the low point area according to the value of "RegionType", and obtain the pixel values of all DSM pixels on the polyline, find out the coordinates of the pixel center point Bottom corresponding to the minimum value in the plane projection coordinate system, and judge 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 coordinates of the low point. 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, which will not be repeated here.
[0090] In this embodiment, after determining the high point and the low point, a vertical line is drawn to the line entity of the third road centerline line vector after node interpolation using the coordinates of the high point and the coordinates of the low point. If the vertical point falls in the middle of the road segment formed by two adjacent nodes, the vertical point is the slope change point. If the foot of the vertical point falls on the extension line of the road segment formed by two adjacent nodes, the end node of the road segment closest to the foot of the vertical point is the slope change point, and the elevation value of the slope change point is equal to the elevation value of the corresponding high point or low point. After determining the slope change point, the "distance to the beginning of the line" of the head node of the line entity of the third road centerline line vector after interpolation of the node where the slope change point is located and the "distance to the end of the line" of the tail node are calculated. If the value of the "distance to the beginning of the line" is less than a given threshold value DT, or the value of the "distance to the end of the line" is less than a given preset first distance, the slope change point is deleted to avoid the situation where the distance of the line entity of the third road centerline line vector after node interpolation is too short, resulting in inaccurate calculated slope.
[0091] It is worth noting that when the fast moving average curve and the slow moving average curve intersect in the way that the fast moving average curve crosses the slow moving average curve from top to bottom, it indicates that a high point has appeared at this time; when the fast moving average curve and the slow moving average curve intersect in the way that the fast moving average curve crosses the slow moving average curve from bottom to top, it indicates that a low point has appeared. The fast moving average curve can reflect the change of elevation faster 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 part of the road section at the intersection in the line entity of the third road centerline line vector after node interpolation as the high point area or the low point area, that is, when the fast moving average curve crosses the slow moving average area from top to bottom, it corresponds to the high point area, and when the fast moving average curve crosses the slow moving average curve from bottom to top, it corresponds to the low point area. In addition, after determining the high point area or the low point area, according to its corresponding coordinate position, it is judged 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 it is judged 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, the area is discarded and the high point area and / or the low point area are re-determined.
[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 entity stored in the fourth road centerline line vector is 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 way in which the slope change point interrupts the line entity in the second road centerline line vector to obtain the entity in the fourth road centerline line vector is the same as the way in which the slope change point interrupts the line entity in the second road centerline line vector to obtain the fourth road centerline line vector in Example 1, wherein after the slope change point is used to interrupt the line entity in the second road centerline line vector, 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 interrupting the line entity in the center line vector of the second road through the above-mentioned slope change point, the line entity in the center line vector of the fourth road is obtained, ensuring that each line entity in the center line vector of the fourth road has only one slope trend, avoiding the inaccurate slope calculated according to the two end points of the line entity in the center line vector of the fourth road when there are both upslope and downslope in the same line entity in the center line vector of the fourth road. This method of using the slope change point segmentation refines the interval of slope calculation and ensures the accuracy of the slope. No further details will be given here.
[0094] Step 204: Calculate the road slope of each line entity in the fourth road centerline line vector data based on the slope change point and the elevation value.
[0095] In this step, the spatial analysis method is used to determine the point where the head node position of the centerline entity of the fourth road centerline line vector coincides with the slope change point position data, the elevation value of the slope change point is determined to be the elevation value of the head node position of the centerline entity of the fourth road centerline line vector, the tail node position of the centerline entity of the fourth road centerline line vector coincides with the slope change point position data, 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 head 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 head node and the tail node are used to determine the distance between the head node and the tail node in the centerline entity of the fourth road centerline line vector, and 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 at the node of the second road centerline line vector centerline entity, how to determine the slope change point according to the third road centerline line vector centerline entity after node interpolation, and then determine the slope accuracy of the fourth road centerline line vector centerline entity. If there is at least one third road centerline line vector centerline 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 line 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 line entity of the third road centerline line vector is less than or equal to the first threshold, how to determine the slope of the line entity of the fourth road centerline line vector is not repeated.
[0097] Based on the above Figure 2 The above embodiment is described by taking the road slope extraction of the main roads in the mountainous area of Mentougou District, Beijing as an example. Figure 3 As shown:
[0098] Step 301: Obtain data related to the study area.
[0099] In this embodiment, the relevant data of the study area include the first digital surface model raster data and the first digital orthophoto raster data of the study area with high spatial resolution. The first digital surface model raster data is to obtain the high-resolution and high-precision DSM raster data covering the study area. This data is obtained by automatically producing a DSM raster image with a sampling interval of 0.3 meters by using the Beijing-3 satellite stereo image covering the mountainous area of Mentougou District, Beijing, that is, using the photogrammetry method to obtain. The DSM adopts the Gauss 2000 plane projection coordinate system. The first road centerline line vector data and the second road centerline line vector data can be extracted according to the first digital orthophoto raster data. The position data of the first road centerline line vector data and the second road centerline line vector data are obtained by the high spatial resolution DOM covering the study area, that is, by covering the Beijing-3 satellite image covering the mountainous area of Mentougou District, Beijing, and performing necessary preprocessing, including orthorectification, fusion, mosaic, uniform color, etc., to obtain a DOM image with a resolution of 0.3 meters covering the study area. The roads in the study area are extracted according to the DOM data.
[0100] Step 302: interpolate the line vector nodes of the second road centerline and correct the abnormal DSM values at the corresponding positions of the nodes, with the first threshold being 10 meters.
[0101] After obtaining the line vector data of the second road centerline in the research area, determine whether the spacing between adjacent nodes of the line entity of the line vector data of the second road centerline is greater than 10 meters. If it is greater than 10 meters, a new node is established every 10 meters, and the new node is added to the line entity of the line vector data of the second road centerline to obtain the line entity of the line vector data of the third road centerline after node interpolation; if it is not greater than 10 meters. Then proceed to the next step of calculation. For the line vector of the third road centerline, the plane projection coordinates of each node are obtained, and the point vector Point1 can be generated according to the coordinates, and the attribute fields "Line_ID", "distance to the beginning of the line" and "distance to the end of the line" are established for the point vector Point1, and the corresponding assignment is performed according to the method described in the technical solution part of the present invention. After determining the point vector Point1 and the DSM grid map, the "elevation" field and "slope" are added to the point vector Point1, and the pixel value of the DSM grid map corresponding to the point position is filled in the "elevation" field. Calculate the slope of the line connecting the "elevation" field values of the two adjacent points before and after, and fill in the "slope" field of the latter point of the two adjacent points. If the value of the "Slope" field of a point is greater than T or less than -T, the point is considered 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 calculation formula of the slope k is 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 99999 is used to indicate it. Use the average elevation of the two points before and after the abnormal point to replace the elevation of the abnormal point and fill in the "Elevation" field; if it is the first point on the road line, replace it with the elevation value of the next point; if it is the last point on the road line, replace it with the elevation value of the previous point. 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 according to the raster data of the first digital orthophoto map, and the abnormal area surface vector anomalyarea is buffered outward by a distance of a pixel size 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 intersected in space 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 the 5 consecutive nodes until all 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 the 10 consecutive nodes until all 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 determine the high point area and the low point area according to the intersection of the two curves, and determine the highest point in the high point area and the lowest point in the low point area according to the above method, and determine the slope change point according to the foot of the high point and the low point to the road line. 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 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 changing point, calculate the line head distance from the slope changing point to the beginning node of the line entity of the centerline vector of the second road centerline and the line end distance to the road end node. When the line head distance or the line end distance is less than 10 meters, delete the slope changing point to avoid the road being too short interrupted by the slope changing point, resulting in inaccurate road slope.
[0110] Step 304: The slope change point interrupts the centerline entity of the second road centerline line vector, and calculates the road slope of the centerline entity of the fourth road centerline line vector after interrupting the centerline entity of the second road centerline line vector.
[0111] In this step, the slope change point interrupts the second road centerline line vector midline entity to obtain multiple road segments, namely, the fourth road centerline line vector midline entity, wherein after the road is interrupted by the slope change point, the slope change trend of the fourth road centerline line vector midline entity obtained is consistent, that is, the slope trend of the fourth road centerline line vector midline entity is one, which can be upslope, downslope, or flat slope. No further details are given here.
[0112] In this step, the spatial analysis method is used to obtain the "elevation" field value from the slope change point that coincides with the first endpoint of each road line in the fourth road centerline line vector, and fill it into the "starting elevation" field; the "elevation" field value is obtained from the slope change point that coincides with the last endpoint of each road line in the fourth road centerline line vector, and fill it into the "end elevation" field. The elevation difference of each road section is calculated according to the following formula, and filled in the "elevation difference" field of the fourth road centerline line vector. Among them, elevation difference = value of the "starting elevation" field - value of the "end elevation" field. The distance of each road section is calculated according to the following formula and filled in 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 andi Respectively represent the horizontal and vertical coordinates of the i-th node, x i-1 and 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 line 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 In order to realize the embodiment of the method shown, the embodiment of the present invention further 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, so as to complete 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 research 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 according to the first road center line line vector data, and interrupts the first road center line line vector according to the road intersection point vector to obtain a second road center line line vector;
[0121] A node interpolation and elevation acquisition unit 42, used for performing node interpolation on each line entity in the second road centerline line vector data in the input acquisition unit 41 to obtain third road centerline line vector data;
[0122] The node interpolation and elevation acquisition unit 42 is used 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 of the input acquisition unit 41;
[0123] A slope change point determination unit 43, used to find the slope change point falling on the third road centerline line vector data of the node interpolation and elevation acquisition unit 42 by using a moving average curve;
[0124] A slope calculation unit 44 is used to interrupt the line entity in the second road center line 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 center line line vector;
[0125] The slope calculation unit 44 is used 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 used to acquire position data of an abnormal area based on the first digital orthophoto raster data, wherein the abnormal area is an area formed by an object that blocks the line vector of the third road centerline;
[0128] A position determination module 422, configured to determine whether a node in a 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 is used to determine the node that is not in the abnormal area according to the position data of the abnormal area and the position data of the node if the node in the middle line entity of the third road centerline line vector in the position determination module 422 is located in the abnormal area;
[0130] The node elevation determination module 423 is used to determine the elevation values of the road points 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.
[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] A slope calculation module 451 calculates the slope of a line connecting adjacent node elevation values in a line entity in the third road centerline line vector data;
[0133] The elevation determination module 452 is used to determine the latter point among the adjacent road points as an elevation abnormal point when the slope of the slope calculation module 451 is not within the 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 establishment module 431 is used 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 line vector;
[0137] The region and slope change point determination module 432 is used to determine the high point region and the 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 used to determine the 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 in the region is used to determine a first point in the high point region and a second point in the low point region, wherein the first point is a point with the largest elevation value in the high point region and the second point is a point with the smallest elevation value in the low point region;
[0141] The slope change point determination submodule 4322 is used to obtain the foot of the perpendicular from the first point and the second point in the submodule 4321 in the determined area to 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 head node and the tail node of the line entity of the third determination submodule 4323 to determine the distance to the line head and the distance to the line end;
[0145] The slope change point deletion submodule 4325 is used to delete the slope change point if the distance from the calculation submodule 4324 to the line head 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 determination module 441, configured to determine the distance of the fourth road centerline line vector based on the position data of two end points of each line entity of the fourth road centerline line vector;
[0148] The elevation difference determination module 442 is used to determine the elevation difference between the two end points based on the position data of the two end points of each line entity of the fourth road centerline line vector of the distance determination module 441;
[0149] The slope determination module 443 is used 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 executable by the processor, 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 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 Figure 1-3 The road slope calculation method based on digital surface model described in.
[0152] In the above embodiments, the description of each embodiment has its own emphasis. 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 understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0154] Those skilled in the art can 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 such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for 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 in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0157] Those skilled in the art will appreciate that 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.
[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 flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 flowchart and / or block diagram. 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 capable of directing a computer or other programmable data processing device to operate 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 A 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 operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0161] In a typical configuration, a computing device includes one or more processors (CPU), 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 include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 disk read-only memory (CD-ROM), digital versatile disk (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 temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0164] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[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 codes. The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A road slope calculation method based on a digital surface model, characterized in that: include: Obtaining the first digital surface model raster data and the first digital orthophoto raster data with high spatial resolution in the study area; Acquire first road surface vector data and first road centerline vector data according to the first digital orthophoto raster data; Generate a road intersection point vector according to the first road centerline line vector data, and interrupt 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; Determine the elevation value of each node in the third road centerline line vector data based on the first digital surface model raster data; Using a moving average curve, finding a slope change point that falls on the centerline vector data of the third road; Interrupt 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 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.
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, wherein the abnormal area is an area formed by an object that blocks the line vector of the third road centerline; Based on the position data of the abnormal area, determining whether a node in the middle line entity of the third road center line vector is located in the abnormal area; If yes, determining the nodes that are not in the abnormal area according to 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 in a line entity in the third road centerline line vector data; When the slope is not within the preset slope range, determining the latter point among the adjacent road points as an elevation abnormal 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, characterized in that: 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; Determine a high point area and a low point area according to the first moving average curve and the second moving average curve; Based on the high point area and the low point area, a slope change point is determined.
5. The method according to claim 4, characterized in that The step of determining 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, the first point being a point with a maximum elevation value in the high point area, and the second point being a point with a minimum elevation value in the low point area; The foot of a line entity from the first point and the second point to the line vector data of the third road centerline is obtained, and the foot of the line entity is determined as a slope change point.
6. The method according to claim 5, characterized in that After obtaining the foot of the perpendicular from the first point data and the second point data to the line entity of the third road centerline line vector data, and determining the foot of the perpendicular as the slope change point, the method further includes: Determine a line entity in a line vector of a third road centerline where the slope change point is located; Calculate the distance from the slope change point to the head node and the tail node of the line entity to determine the distance to the beginning of the line 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 the 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 in a research area; The input acquisition unit is used to acquire first road surface vector data and first road centerline vector data according to the first digital orthophoto raster data; The input acquisition unit generates a road intersection point vector according to the first road center line line vector data, and interrupts the first road center line line vector according to the road intersection point vector to obtain a second road center line line vector; A node interpolation and elevation acquisition unit, used for performing node interpolation on each line entity in the second road centerline line vector data in the input acquisition unit to obtain third road centerline line vector data; The node interpolation and elevation acquisition unit is used 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 of the input acquisition unit; A slope change point determination unit, used for finding the slope change point falling on the third road centerline line vector data of the node interpolation and elevation acquisition unit by using a moving average curve; 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 through 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 described in any one of claims 1-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, the device where the storage medium is located is controlled 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
Method for extracting surface feature elements in topographic map
CN111382715A
Emergency path planning method and device based on three-dimensional image pair and medium
CN117191048A
Lane line vector graph generation method and device
CN119131300A
Cited By
Mountain area power transmission and transformation project downslope slag slipping detection method based on remote sensing three-dimensional width change
CN121095806A