Road network elevation data generation method and device, equipment and storage medium
By filtering the distance and elevation values between road network sampling points and terrain sampling points, road network elevation data is generated, which solves the problem of high cost and low efficiency in generating road network elevation data in the existing technology, and achieves low-cost, high-efficiency data generation and high accuracy.
Patent Information
- Application Number
- CN202310318012.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-01
AI Technical Summary
Generating road network elevation data in the existing technology is costly and inefficient, making it difficult to achieve low-cost and efficient data generation.
By using the elevation values of multiple terrain sampling points of the elevation data of the target area, the initial elevation values of multiple road network sampling points of the road network data are obtained, and based on the distance and elevation values between the road network sampling points and the terrain sampling points. Filter the terrain sampling points to obtain the target elevation values of the road network sampling points, thereby generating road network elevation data.
It achieves low-cost and efficient generation of road network elevation data, improves the scale and accuracy of data generation, and has good usability.
Smart Images

Figure CN118730074A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of road network elevation data, and in particular to a road network elevation data generating method, a road network elevation data generating device, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the development of computer technology and Internet technology, the application of autonomous driving in different business scenarios has increased significantly. In practical applications, when unmanned equipment realizes autonomous driving, it usually relies on pre-built autonomous driving map data, and plans and predicts the driving route by analyzing the information in the autonomous driving map data. Autonomous driving map data can include different types of data that record different types of information. For example, autonomous driving map data can include elevation data, which records the altitude of each part of the target area, and can also include road network data, which records the road elements of each road in the target area.
[0003] In order for unmanned equipment to obtain driving routes more accurately, it is usually necessary to combine multiple data in the autonomous driving map data. For example, when elevation data and road network data are combined, road network elevation data can be generated. Road network elevation data can effectively show the elevation information of each multi-layer road in the presence of overlapping multi-layer roads, which plays an important role in the realization of autonomous driving functions. However, in the related art, the road network elevation data is mainly generated by collecting elevation data through detection vehicles, and then manually annotating the road network data according to the elevation data, which is not only costly but also inefficient. Therefore, how to generate road network elevation data at low cost and high efficiency has become an important technical issue in this field. Summary of the invention
[0004] The embodiments of the present application provide a road network elevation data generation method, a road network elevation data generation device, an electronic device, and a computer-readable storage medium, which can generate road network elevation data at low cost and high efficiency.
[0005] On the one hand, an embodiment of the present application provides a method for generating road network elevation data, including: obtaining initial elevation values of multiple road network sampling points of the road network data of the target area according to the elevation values of multiple terrain sampling points of the elevation data of the target area; for each road network sampling point, respectively executing: filtering multiple terrain sampling points according to the distance between the road network sampling point and the multiple terrain sampling points, the initial elevation value of the road network sampling point and the elevation values of the multiple terrain sampling points to obtain multiple target terrain sampling points, and obtaining target elevation values of the road network sampling points according to the initial elevation value and the elevation values of the multiple target terrain sampling points; and determining the target elevation values of the multiple road network sampling points as the road network elevation data of the target area.
[0006] In some embodiments, initial elevation values of multiple road network sampling points of road network data of the target area are obtained based on elevation values of multiple terrain sampling points of elevation data of the target area, including: obtaining elevation values of multiple terrain sampling points of the elevation data; averaging the elevation values of the multiple terrain sampling points to obtain a first elevation average value; and determining the first elevation average value as the initial elevation value of the multiple road network sampling points.
[0007] In some embodiments, filtering multiple terrain sampling points according to the distance between the road network sampling point and multiple terrain sampling points, the initial elevation value of the road network sampling point and the elevation values of the multiple terrain sampling points to obtain multiple target terrain sampling points includes: looping the following steps until M is equal to N: selecting multiple terrain sampling points according to the distance between the road network sampling point and the multiple terrain sampling points to obtain N first terrain sampling points that meet a preset distance condition; selecting N first terrain sampling points according to the initial elevation value of the road network sampling point and the elevation values of the multiple first terrain sampling points to obtain M second terrain sampling points that meet a preset elevation condition; and deleting NM first terrain sampling points that do not meet the preset elevation condition from the multiple terrain sampling points to obtain updated multiple terrain sampling points; determining the N second terrain sampling points as N target terrain sampling points; wherein N and M are positive integers, and M is less than or equal to N.
[0008] In some embodiments, multiple terrain sampling points are selected according to the distance between the road network sampling point and the multiple terrain sampling points to obtain N first terrain sampling points that meet the preset distance condition, including: calculating the distance between the road network sampling point and the multiple terrain sampling points according to the coordinates of the road network sampling point and the coordinates of the multiple terrain sampling points; selecting the top N distances from the multiple distances in ascending order; and determining the N terrain sampling points corresponding to the top N distances as the first terrain sampling points.
[0009] In some embodiments, according to the initial elevation value of the road network sampling point and the elevation values of multiple first terrain sampling points, N first terrain sampling points are selected to obtain M second terrain sampling points that meet the preset elevation condition, including: for each first terrain sampling point, respectively executing: calculating the absolute value of the difference between the initial elevation value and the elevation value of the first terrain sampling point to obtain the absolute value of the elevation difference; when the absolute value of the elevation difference is less than or equal to a first threshold, determining the first terrain sampling point as the second terrain sampling point; or, when the absolute value of the elevation difference is greater than the first threshold, determining the first terrain sampling point as the first terrain sampling point that does not meet the preset elevation condition.
[0010] In some embodiments, a target elevation value of a road network sampling point is obtained based on an initial elevation value and the elevation values of multiple target terrain sampling points, including: taking an average of the initial elevation value and the elevation values of multiple target terrain sampling points to obtain a second elevation average value; and determining the second elevation average value as the target elevation value of the road network sampling point.
[0011] On the other hand, an embodiment of the present application provides a road network elevation data generating device, including: a first processing module, used to obtain the initial elevation values of multiple road network sampling points of the road network data of the target area according to the elevation values of multiple terrain sampling points of the elevation data of the target area; a second processing module, including a filtering unit and an acquisition unit, the filtering unit is used to perform, for each road network sampling point, respectively: according to the distance between the road network sampling point and the multiple terrain sampling points, the initial elevation value of the road network sampling point and the elevation values of the multiple terrain sampling points, filtering the multiple terrain sampling points to obtain multiple target terrain sampling points, the acquisition unit is used to perform, for each road network sampling point, respectively: according to the initial elevation value and the elevation values of the multiple target terrain sampling points, obtaining the target elevation value of the road network sampling point; a generating module, used to determine the target elevation values of the multiple road network sampling points as the road network elevation data of the target area.
[0012] On the other hand, an electronic device provided by an embodiment of the present application includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the above road network elevation data generation method is implemented.
[0013] Another aspect of an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method for generating road network elevation data is implemented.
[0014] The road network elevation data generation method of the embodiment of the present application first obtains the initial elevation values of the multiple road network sampling points of the road network data of the target area according to the elevation values of the multiple terrain sampling points of the elevation data of the target area. Then, for each road network sampling point, according to the distance between the road network sampling point and the multiple terrain sampling points and the elevation values of the road network sampling point and the multiple terrain sampling points, the multiple terrain sampling points are filtered to obtain the target terrain sampling point, and according to the initial elevation value and the elevation values of the multiple target terrain sampling points, the target elevation value of the road network sampling point is obtained. The elevation values of the multiple road network sampling points are used as the road network elevation data of the target area. The elevation data and the road network data can be combined with each other to generate the road network elevation data at low cost and high efficiency. While improving the generation scale of the road network elevation data, the accuracy of the generated road network elevation data can be guaranteed, and the method has good usability. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 It is a flowchart of a method for generating road network elevation data provided by an embodiment of the present application;
[0017] Figure 2 Shows Figure 1 An exemplary schematic diagram of some steps in the flowchart shown;
[0018] Figure 3 Shows Figure 1 An exemplary schematic diagram of some steps in the flowchart shown;
[0019] Figure 4 Shows Figure 3 An exemplary schematic diagram of some steps in the flowchart shown;
[0020] Figure 5 Shows Figure 3 An exemplary schematic diagram of some steps in the flowchart shown;
[0021] Figure 6 Shows Figure 1 An exemplary schematic diagram of some steps in the flowchart shown;
[0022] Figure 7 It is a structural schematic diagram of a road network elevation data generating device provided in an embodiment of the present application.
[0023] In the attached figure:
[0024] 100-Road network elevation data generating device; 1-First processing module; 2-Second processing module; 21-Filtering unit; 22-Acquisition unit; 3-Generation module. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0027] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the embodiments of the present application should have the common meanings understood by technicians in the field to which the embodiments of the present application belong.
[0028] In addition, the technical terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0029] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0030] Figure 1 FIG. 1 is a flow chart of a method for generating road network elevation data provided by an embodiment of the present application. Figure 1 As shown, the method for generating road network elevation data includes the following steps.
[0031] S100, obtaining initial elevation values of a plurality of road network sampling points of road network data of the target area according to the elevation values of a plurality of terrain sampling points of the elevation data of the target area.
[0032] For each road network sampling point, steps S200 - S300 are performed respectively.
[0033] S200 , filtering the multiple terrain sampling points according to the distances between the road network sampling points and the multiple terrain sampling points, the initial elevation values of the road network sampling points and the elevation values of the multiple terrain sampling points to obtain multiple target terrain sampling points.
[0034] S300: Obtain a target elevation value of a road network sampling point according to an initial elevation value and elevation values of a plurality of target terrain sampling points.
[0035] S400: Determine target elevation values of multiple road network sampling points as road network elevation data of a target area.
[0036] The target area may be any area for which road network elevation data is to be obtained. The elevation data may record altitude elements such as terrain and corresponding coordinates, and the road network data may record road elements such as road directions and corresponding coordinates, that is, the elevation data and the altitude elements and road elements of the road network data may correspond to each other through coordinates. In some examples, the elevation data and road network data of the target area may be directly obtained from the system or database or any storage medium. In other examples, the altitude elements and road elements of the target area may also be collected through a collection device.
[0037] In step S100, the elevation data is data that can reflect the correlation between the altitude element and the coordinates of the target area. In some optional embodiments, the elevation data can be a contour map, which includes multiple terrain sampling points, and the terrain sampling points can record the altitude of the current position. In the process of collecting elevation data, the altitude elements of multiple terrain sampling points in the area to be collected are collected, and then the coordinates of the terrain sampling points and the altitude elements are matched with each other. In other words, the elevation data is composed of the coordinates of multiple terrain sampling points and the altitude elements.
[0038] Road network data is data that can reflect the correlation between road elements and coordinates in the target area. In some optional embodiments, the road network data can be a road network map, which includes multiple road network sampling points. The road network sampling points can record the road network shape and direction of the current position. The road network map can also include multiple road sections, each of which can connect two adjacent road network sampling points to show the direction of the road. In the process of collecting road network data, the road elements of multiple road network sampling points in the area to be collected are collected, and then the coordinates of the road network sampling points are matched with the road elements. In other words, the road network data is composed of the coordinates of multiple road network sampling points and road elements.
[0039] The initial elevation value of the road network sampling point of the road network data can be obtained through the elevation values of multiple terrain sampling points of the elevation data. In some examples, the initial elevation value can be the average of the elevation values of multiple terrain sampling points. In other examples, the initial elevation value can be the inverse distance weighted average of the elevation values of multiple terrain sampling points obtained for each road network sampling point according to the positional relationship between the road network sampling point and the multiple terrain sampling points. The inverse distance weight can reflect the influence of the elevation value of each terrain sampling point on the elevation value of the road network sampling point according to the distance between the road network sampling point and the terrain sampling point. The closer the distance between the terrain sampling points, the greater the influence of the elevation value of the terrain sampling point on the elevation value of the road network sampling point.
[0040] In step S200, for each road network sampling point, multiple terrain sampling points around the current road network sampling point can be filtered according to the distance between the road network sampling point and multiple terrain sampling points, as well as the initial elevation value of the road network sampling point and the elevation values of the multiple terrain sampling points, that is, according to the preset distance condition and the preset elevation condition, to obtain multiple target terrain sampling points that simultaneously meet the preset distance condition and the preset elevation condition.
[0041] In some optional embodiments, the target terrain sampling points may be a predetermined number of terrain sampling points with the shortest distance from the current road network sampling points, or the target terrain sampling points may be a plurality of terrain sampling points with a distance from the current road network sampling points not exceeding a preset threshold, as a preset distance condition to filter the terrain sampling points. In other optional embodiments, the target terrain sampling points may be a terrain sampling point with an absolute value of an elevation difference between an elevation value and an initial elevation value of the road network sampling point not exceeding a first threshold, or the target terrain sampling points may be a predetermined number of terrain sampling points with an initial elevation value of the road network sampling point as an intermediate value, as a preset elevation condition to filter the plurality of terrain sampling points.
[0042] In step S300, for each road network sampling point, after obtaining N target terrain sampling points, the target elevation value of the current road network sampling point can be obtained according to the initial elevation value of the road network sampling point and the elevation values of multiple target terrain sampling points. In the case where multiple target terrain sampling points are obtained by screening based on the distance condition and the elevation condition, the multiple target terrain sampling points are closest to the current road network sampling point, and the difference between the elevation values of the multiple target terrain sampling points and the initial elevation value of the road network sampling point, that is, the average elevation value of the target area, does not exceed the first threshold. In the case where the road network sampling point is obtained based on the road network data, the elevation values of the multiple target terrain sampling points can reflect the elevation values of the road network sampling points, which is convenient for combining the road network data with the elevation data. In some examples, the elevation value of the road network sampling point can be obtained according to the average elevation value of the multiple target terrain sampling points. In other examples, the inverse distance weight of each target terrain sampling point relative to the current road network sampling point can also be obtained, and the inverse distance weighted average of the elevation values of the multiple target terrain sampling points is calculated according to the inverse distance weight, thereby obtaining the elevation value of the road network sampling point.
[0043] In step S400, when the road network sampling point is obtained by sampling the road network data, and the elevation value of the road network sampling point is obtained by the elevation value of the target terrain sampling point provided by the elevation data, the elevation data and the road network data can be associated, that is, the road network elevation data of the target area is obtained. The road network elevation data can be regarded as a collection of multiple road network sampling points, each of which includes corresponding road elements, altitude elements and coordinates. Therefore, the road network elevation data records the altitude elements and road elements of multiple coordinate points, which can play an important role in the realization of the automatic driving function.
[0044] Figure 2 Shows Figure 1 An exemplary schematic diagram of some steps in the flowchart shown in FIG. Figure 2 As shown, step S100 includes the following steps.
[0045] S110, obtaining elevation values of a plurality of terrain sampling points of elevation data.
[0046] S120, averaging the elevation values of multiple terrain sampling points to obtain a first elevation average value.
[0047] S130: Determine the first average elevation value as the initial elevation value of the plurality of road network sampling points.
[0048] In step S110, in the process of collecting elevation data, the elevation elements of multiple terrain sampling points in the area to be collected are collected, and then the coordinates of the terrain sampling points are made to correspond to the elevation elements. Among the multiple terrain sampling points of the elevation data, each terrain sampling point records the coordinates of the current position and the altitude. Multiple terrain sampling points can be obtained according to the elevation data, and then the elevation values corresponding to the multiple terrain sampling points are obtained, wherein each terrain sampling point can be marked by the coordinates of the terrain sampling point.
[0049] In step S120, after obtaining the elevation values of the plurality of terrain sampling points, the elevation values of the plurality of terrain sampling points may be averaged, and the average value may be taken as a first elevation average value. The first elevation average value may indicate the average altitude of the target area.
[0050] In step S130, the first average elevation value is assigned to each road network sampling point as the initial elevation value of the multiple road network sampling points.
[0051] Figure 3 Shows Figure 1 An exemplary schematic diagram of some steps in the flowchart shown in FIG. Figure 3 As shown, in some optional embodiments, step S200 includes the following steps.
[0052] S210 . Select multiple terrain sampling points according to the distances between the road network sampling points and the multiple terrain sampling points to obtain N first terrain sampling points that meet a preset distance condition.
[0053] S220 , selecting N first terrain sampling points according to the initial elevation values of the road network sampling points and the elevation values of the plurality of first terrain sampling points, to obtain M second terrain sampling points that meet a preset elevation condition.
[0054] S230: Delete NM first terrain sampling points that do not meet the preset elevation condition from the plurality of terrain sampling points to obtain a plurality of updated terrain sampling points.
[0055] S240, compare N and M. When M is less than N, return to step S210, and when M is equal to N, execute step S250.
[0056] S250: Determine N second terrain sampling points as N target terrain sampling points.
[0057] Wherein, N and M are positive integers, and M is less than or equal to N.
[0058] In step S210, multiple terrain sampling points may be selected based on the distance between the road network sampling point and multiple pre-selected terrain sampling points according to a preset distance condition, and N first terrain sampling points may be obtained from the multiple pre-selected terrain sampling points. That is, the terrain sampling points are filtered based on the distance condition, and N terrain sampling points that meet the preset distance condition are selected from the multiple terrain sampling points as the first terrain sampling points.
[0059] In step S220, multiple terrain sampling points may be selected based on the initial elevation value of the road network sampling point and the elevation values of multiple terrain sampling points according to a preset elevation condition, and M second terrain sampling points may be obtained from the N first terrain sampling points, where M is less than or equal to N. That is, the N terrain sampling points that have met the distance condition are filtered based on the elevation value, and M terrain sampling points whose elevation values differ from the initial elevation values within a certain range are selected as the second terrain sampling points.
[0060] In step S230, since the target sampling point should satisfy both the distance condition and the elevation condition, if there are NM first terrain sampling points that do not satisfy the preset elevation condition, the NM first terrain sampling points can be deleted from the plurality of terrain sampling points, so that they are not counted into the selection range in the next cycle. The updated plurality of terrain sampling points can be regarded as terrain sampling points that do not include the NM terrain sampling points that satisfy the distance condition but do not satisfy the elevation condition.
[0061] In step S240, in some examples, N and M may be compared after obtaining M second terrain sampling points in step S220, and in other examples, N and M may be compared while or after executing step S230. When M is less than N, the process may return to step S210 to loop through steps S210-S230, and when M is equal to N, step S250 may be executed.
[0062] In step S250, the obtained N second terrain sampling points are used as N target terrain sampling points.
[0063] In the process of looping steps S210-S230, N is a fixed value, and M can increase with the number of loops. After the first loop, M terrain sampling points that meet both the preset distance condition and the preset elevation condition can be obtained as the second terrain sampling points. In the second loop, N terrain sampling points that meet the preset distance condition are first selected from the updated multiple terrain sampling points as the first terrain sampling points. It can be imagined that the N first terrain sampling points include the M second terrain sampling points obtained in the first loop, and the verification result of the elevation condition in the previous loop can be applied to the next loop to save computing power. Therefore, only the NM first terrain sampling points that are not selected in the first loop can be verified for the elevation condition, and the terrain sampling points that meet the elevation condition among the NM first terrain sampling points and the second terrain sampling points obtained in the first loop are regarded as the M second terrain sampling points in the second loop. At this time, M has an updated value. Afterwards, the first terrain sampling points that do not meet the elevation condition can be deleted again to obtain updated multiple terrain sampling points. By analogy, in the i-th cycle, the selected N first terrain sampling points that meet the preset distance condition all meet the preset elevation condition. At this time, M is equal to N, the cycle can be ended, and N second terrain sampling points are obtained.
[0064] Specifically, for example, when N is equal to 10. After the first cycle, 6 terrain sampling points that meet both the preset distance condition and the preset elevation condition can be obtained as the second terrain sampling points, and at this time, M is equal to 6; in the second cycle, 10 terrain sampling points that meet the preset distance condition are selected from the updated multiple terrain sampling points as the first terrain sampling points. Since the 10 first terrain sampling points include the 6 second terrain sampling points obtained in the first cycle, the elevation condition can be verified only for the 4 first terrain sampling points that have not been selected in the first cycle, and the 2 terrain sampling points that meet the elevation condition among the 4 first terrain sampling points and the 6 second terrain sampling points obtained in the first cycle are used as the 8 second terrain sampling points. At this time, M is equal to 8... and so on. In the i-th cycle, the selected 10 first terrain sampling points that meet the preset distance condition all meet the preset elevation condition. At this time, the cycle can be ended and 10 second terrain sampling points can be obtained.
[0065] Figure 4 Shows Figure 3 An exemplary schematic diagram of some steps in the flowchart shown in FIG. Figure 4 As shown, step S210 includes the following steps.
[0066] S211. Calculate the distance between the road network sampling point and the multiple terrain sampling points according to the coordinates of the road network sampling point and the coordinates of the multiple terrain sampling points.
[0067] S212. Select N distances with the highest ranking from the multiple distances in ascending order.
[0068] S213: Determine N terrain sampling points corresponding to the first N distances as first terrain sampling points.
[0069] In step S211, for each sampling point, the coordinates of the current road network sampling point can be obtained according to the road network data, and the coordinates of multiple terrain sampling points can be obtained according to the elevation data. The distance between the road network sampling point and the multiple terrain sampling points can reflect the influence of the elevation value of each terrain sampling point on the elevation value of the road network sampling point, wherein the elevation value of the terrain sampling point closer to the road network sampling point can have a greater influence on the elevation value of the road network sampling point.
[0070] In step S212, in some examples, when multiple distances between the road network sampling point and the multiple terrain sampling points are obtained, the multiple distances may be sorted from small to large to obtain a distance sequence, and then the first N distances are selected from the distance sequence. Optionally, N may be an integer from 6 to 20.
[0071] In step S213, when the top N distances are selected from multiple distances in ascending order, N terrain sampling points corresponding to the N distances can be obtained, and the N terrain sampling points are taken as the N first terrain sampling points, that is, the N terrain sampling points closest to the road network sampling point are selected. At this time, the preset distance condition is: the target terrain sampling point is a predetermined number of terrain sampling points with the smallest distance to the current road network sampling point.
[0072] Figure 5 Shows Figure 3 An exemplary schematic diagram of some steps in the flowchart shown in FIG. Figure 5 As shown, step S220 includes the following steps.
[0073] For each first terrain sampling point, step S221, step S222, step S222 or step S222' is executed respectively.
[0074] S221. Calculate the absolute value of the difference between the initial elevation value and the elevation value of the first terrain sampling point to obtain the absolute value of the elevation difference.
[0075] S222, compare the absolute value of the elevation difference and the first threshold. If the absolute value of the elevation difference is less than or equal to the first threshold, execute step S223, and if the absolute value of the elevation difference is greater than the first threshold, execute step S223'.
[0076] S223: When the absolute value of the elevation difference is less than or equal to the first threshold, determine the first terrain sampling point as the second terrain sampling point.
[0077] S223′: When the absolute value of the elevation difference is greater than the first threshold, determine that the first terrain sampling point is the first terrain sampling point that does not meet the preset elevation condition.
[0078] In step S221, for each first terrain sampling point, the absolute value of the difference between the initial elevation value of the current road network sampling point and the elevation value of the first terrain sampling point is calculated to obtain the absolute value of the elevation difference. The absolute value of the elevation difference can reflect the degree of deviation between the initial elevation value and the elevation value of the first terrain sampling point, that is, the degree of deviation between the elevation value of the current first terrain sampling point and the average value of the elevation value of the target area.
[0079] In step S222, the absolute value of the elevation difference and the first threshold are compared. When the absolute value of the elevation difference is less than or equal to the first threshold, step S223 is executed. When the absolute value of the elevation difference is greater than the first threshold, step S223' is executed.
[0080] In step S223, when the absolute value of the elevation difference is less than or equal to the first threshold, the elevation value of the current first terrain sampling point deviates from the average value of the elevation value of the target area to a small extent, and it can be determined that the current first terrain sampling point is not an error point or a noise point, and the elevation value of the current first terrain sampling point can accurately reflect the elevation value of the road network sampling point. Therefore, the current first terrain sampling point can be determined as the second terrain sampling point.
[0081] In step S223', when the absolute value of the elevation difference is greater than the first threshold, the elevation value of the current first terrain sampling point deviates greatly from the average value of the elevation value of the target area, and it can be judged that an error may have occurred when collecting the current terrain sampling point. The current first terrain sampling point is an error point or a noise point, and its elevation value cannot accurately reflect the elevation value of the road network sampling point. Therefore, the current first terrain sampling point is the first terrain sampling point that does not meet the preset elevation condition.
[0082] In some other optional embodiments, multiple terrain sampling points can be first screened according to a preset elevation condition. For example, for each terrain sampling point, the absolute value of the difference between the initial elevation value of the current road network sampling point and the elevation value of the terrain sampling point is calculated. When the absolute value of the elevation difference is less than or equal to the first threshold, the deviation between the elevation value of the current terrain sampling point and the average value of the elevation value of the target area is small, and the current terrain sampling point can be judged not to be an error point or a noise point. Otherwise, the terrain sampling points whose absolute value of the elevation difference is greater than the first threshold can be deleted from the multiple terrain sampling points to obtain multiple updated terrain sampling points. Afterwards, the screened terrain sampling points are screened according to a preset distance condition. For example, the N terrain sampling points closest to the current road network sampling point can be sorted according to the distance between the road network sampling point and the updated multiple terrain sampling points, and the N terrain sampling points are used as target terrain sampling points. At this time, the obtained target distance sampling point satisfies both the preset distance condition and the preset elevation condition. It should be understood that in the process of calculating the absolute value of the difference between the initial elevation value and the elevation values of multiple terrain sampling points, since the initial elevation value is a unified first elevation average value, in actual application, the data calculated once can be reused for each road network sampling point, thereby avoiding the problem of redundant data.
[0083] In some further optional embodiments, multiple terrain sampling points may be first screened by a preset distance condition, and then the screened terrain sampling points may be screened by a preset elevation condition in different ways. For example, the N+q terrain sampling points closest to the current road network sampling point may be sorted according to the distance between the road network sampling point and the updated multiple terrain sampling points, and the N+q terrain sampling points may be used as the first terrain sampling points. Afterwards, the elevation conditions of the N+q terrain sampling points are verified, and for each terrain sampling point, the absolute value of the difference between the initial elevation value of the current road network sampling point and the elevation value of the terrain sampling point is calculated. When the absolute value of the elevation difference is less than or equal to the first threshold, the current terrain sampling point is determined to be the target terrain sampling point, and N target terrain sampling points that meet both the preset distance condition and the preset elevation condition are selected from the N+q terrain sampling points. It should be understood that the value of q may be greater than or equal to one third of N to ensure that sufficient terrain sampling points can be selected when verifying the distance condition, so that N target terrain sampling points can be obtained when verifying the elevation condition.
[0084] Figure 6 Shows Figure 1 An exemplary schematic diagram of some steps in the flowchart shown in FIG. Figure 6 As shown, step S300 includes the following steps.
[0085] S310, taking an average of the initial elevation value and the elevation values of a plurality of target terrain sampling points to obtain a second average elevation value.
[0086] S320: Determine the second average elevation value as the target elevation value of the road network sampling point.
[0087] In step S310, for each road network sampling point, an average value of the initial elevation value of the current road network sampling point and the elevation values of multiple target terrain sampling points is taken, and the average value is taken as the second elevation average value.
[0088] In step S320, the obtained second average elevation value is assigned to the road network sampling point as the elevation value of the road network sampling point.
[0089] In some optional embodiments, the road network elevation data generating method may be implemented by the road network elevation data generating device 100, or may be implemented by the road network elevation data generating device 100 together with other units, components or devices, and the embodiments of the present application do not impose any restrictions on this.
[0090] Figure 7 FIG. 1 is a schematic diagram of the structure of a road network elevation data generating device 100 provided in one embodiment of the present application. Figure 6As shown, the road network elevation data generating device 100 includes a first processing module 1, a second processing module 2 and a generating module 3. The second processing module 2 includes a filtering unit 21 and an acquiring unit 22.
[0091] The first processing module 1 is used to obtain the initial elevation values of multiple road network sampling points of the road network data of the target area according to the elevation values of multiple terrain sampling points of the elevation data of the target area. The filtering unit 21 of the second processing module 2 is used to perform for each road network sampling point: filtering multiple terrain sampling points according to the distance between the road network sampling point and the multiple terrain sampling points, and the initial elevation value of the road network sampling point and the elevation values of the multiple terrain sampling points to obtain multiple target terrain sampling points. The acquisition unit 22 is used to perform for each road network sampling point: obtaining the target elevation value of the road network sampling point according to the initial elevation value and the elevation values of the multiple target terrain sampling points. The generation module 3 is used to determine the target elevation values of the multiple road network sampling points as the road network elevation data of the target area.
[0092] In some embodiments of the present application, the first processing module 1 is also used to obtain elevation values of multiple terrain sampling points of elevation data, take the average of the elevation values of the multiple terrain sampling points to obtain a first elevation average value, and determine the first elevation average value as the initial elevation value of multiple road network sampling points.
[0093] In some embodiments of the present application, the filtering unit 21 of the second processing module 2 is further used to loop the following steps until M is equal to N: select multiple terrain sampling points according to the distance between the road network sampling point and the multiple terrain sampling points to obtain N first terrain sampling points that meet the preset distance condition, select N first terrain sampling points according to the initial elevation value of the road network sampling point and the elevation values of the multiple first terrain sampling points to obtain M second terrain sampling points that meet the preset elevation condition, and delete NM first terrain sampling points that do not meet the preset elevation condition from the multiple terrain sampling points to obtain updated multiple terrain sampling points, and then the filtering unit 21 is further used to determine the M second terrain sampling points as the N target terrain sampling points. Wherein, N and M are positive integers, and M is less than or equal to N.
[0094] In some embodiments of the present application, the filtering unit 21 of the second processing module 2 is also used to calculate the distance between the road network sampling point and the multiple pre-selected terrain sampling points based on the coordinates of the road network sampling point and the coordinates of the multiple pre-selected terrain sampling points, select the top N distances from the multiple distances in ascending order, and determine the N terrain sampling points corresponding to the top N distances as the first terrain sampling points.
[0095] In some embodiments of the present application, the filtering unit 21 of the second processing module 2 is also used to perform, for each first terrain sampling point, the following steps: calculating the absolute value of the difference between the initial elevation value and the elevation value of the first terrain sampling point to obtain the absolute value of the elevation difference, and, when the absolute value of the elevation difference is less than or equal to a first threshold, determining the first terrain sampling point to be a second terrain sampling point, or, when the absolute value of the elevation difference is greater than the first threshold, determining the first terrain sampling point to be a first terrain sampling point that does not meet a preset elevation condition.
[0096] In some embodiments of the present application, the acquisition unit 22 of the second processing module 2 is also used to take the average of the initial elevation value and the elevation values of multiple target terrain sampling points to obtain a second elevation average value, and to determine the second elevation average value as the target elevation value of the road network sampling point.
[0097] Based on the above description, an embodiment of the present application further provides an electronic device, the electronic device comprising a processor and a memory storing computer program instructions. When the processor executes the computer program instructions, the above method for generating road network elevation data is implemented.
[0098] The processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0099] The memory may include a large capacity memory for data or instructions. For example, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of the above. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory is a non-volatile solid-state memory.
[0100] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of an embodiment of the present application.
[0101] In addition, in combination with the above description, the embodiment of the present application further provides a computer storage medium. The computer readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the above road network elevation data generation method can be implemented.
[0102] In summary, the road network elevation data generation method provided by the embodiment of the present application first obtains the initial elevation values of the multiple road network sampling points of the road network data of the target area according to the elevation values of the multiple terrain sampling points of the elevation data of the target area. Then, for each road network sampling point, according to the distance between the road network sampling point and the multiple terrain sampling points and the elevation values of the road network sampling point and the multiple terrain sampling points, the multiple terrain sampling points are filtered to obtain the target terrain sampling point, and the target elevation value of the road network sampling point is obtained according to the initial elevation value and the elevation values of the multiple target terrain sampling points. The elevation values of the multiple road network sampling points are used as the road network elevation data of the target area, and the elevation data and the road network data can be combined with each other to generate the road network elevation data at low cost and high efficiency. While improving the generation scale of the road network elevation data, the accuracy of the generated road network elevation data can be guaranteed, and it has good usability.
[0103] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for generating road network elevation data, characterized in that: include: Obtaining initial elevation values of multiple road network sampling points of road network data of the target area according to the elevation values of multiple terrain sampling points of the elevation data of the target area; For each of the road network sampling points, respectively performing: filtering the multiple terrain sampling points according to the distance between the road network sampling point and the multiple terrain sampling points, the initial elevation value of the road network sampling point and the elevation values of the multiple terrain sampling points to obtain multiple target terrain sampling points; and obtaining the target elevation value of the road network sampling point according to the initial elevation value and the elevation values of the multiple target terrain sampling points; The target elevation values of the plurality of road network sampling points are determined as the road network elevation data of the target area.
2. The method for generating road network elevation data according to claim 1, characterized in that: The step of obtaining the initial elevation values of the plurality of road network sampling points of the road network data of the target area according to the elevation values of the plurality of terrain sampling points of the elevation data of the target area comprises: Obtaining elevation values of a plurality of terrain sampling points of the elevation data; Taking an average of the elevation values of the plurality of terrain sampling points to obtain a first elevation average value; The first average elevation value is determined as the initial elevation value of the plurality of road network sampling points.
3. The method for generating road network elevation data according to claim 1, characterized in that: The filtering of the plurality of terrain sampling points according to the distance between the road network sampling point and the plurality of terrain sampling points, the initial elevation value of the road network sampling point and the elevation values of the plurality of terrain sampling points to obtain a plurality of target terrain sampling points comprises: The following steps are executed in a loop until M is equal to N: selecting the plurality of terrain sampling points according to the distance between the road network sampling point and the plurality of terrain sampling points to obtain N first terrain sampling points that meet a preset distance condition; selecting the N first terrain sampling points according to the initial elevation value of the road network sampling point and the elevation values of the plurality of first terrain sampling points to obtain M second terrain sampling points that meet a preset elevation condition; and deleting NM first terrain sampling points that do not meet the preset elevation condition from the plurality of terrain sampling points to obtain updated plurality of terrain sampling points; Determining the N second terrain sampling points as N target terrain sampling points; Wherein, N and M are positive integers, and M is less than or equal to N.
4. The method for generating road network elevation data according to claim 3, characterized in that: The selecting of the plurality of terrain sampling points according to the distance between the road network sampling point and the plurality of terrain sampling points to obtain N first terrain sampling points that meet a preset distance condition comprises: Calculating the distance between the road network sampling point and the multiple terrain sampling points according to the coordinates of the road network sampling point and the coordinates of the multiple terrain sampling points; Selecting the top N distances from the plurality of distances in ascending order; The N terrain sampling points corresponding to the first N distances are determined as the first terrain sampling points.
5. The method for generating road network elevation data according to claim 4, characterized in that: The step of selecting N first terrain sampling points according to the initial elevation value of the road network sampling point and the elevation values of the plurality of first terrain sampling points to obtain M second terrain sampling points that meet a preset elevation condition comprises: For each of the first terrain sampling points, execute respectively: Calculating the absolute value of the difference between the initial elevation value and the elevation value of the first terrain sampling point to obtain the absolute value of the elevation difference; When the absolute value of the elevation difference is less than or equal to a first threshold, determining the first terrain sampling point as a second terrain sampling point; or, When the absolute value of the elevation difference is greater than the first threshold, the first terrain sampling point is determined to be a first terrain sampling point that does not meet the preset elevation condition.
6. The method for generating road network elevation data according to claim 1, characterized in that: The step of obtaining the target elevation value of the road network sampling point according to the initial elevation value and the elevation values of the plurality of target terrain sampling points comprises: Taking an average value of the initial elevation value and the elevation values of a plurality of target terrain sampling points to obtain a second elevation average value; The second elevation average value is determined as the target elevation value of the road network sampling point.
7. A road network elevation data generating device, characterized in that: include: A first processing module, configured to obtain initial elevation values of a plurality of road network sampling points of the road network data of the target area according to the elevation values of a plurality of terrain sampling points of the elevation data of the target area; The second processing module includes a filtering unit and an acquisition unit, wherein the filtering unit is used to perform, for each of the road network sampling points, filtering the plurality of terrain sampling points according to the distance between the road network sampling point and the plurality of terrain sampling points, the initial elevation value of the road network sampling point and the elevation values of the plurality of terrain sampling points to obtain a plurality of target terrain sampling points, and the acquisition unit is used to perform, for each of the road network sampling points, acquiring a target elevation value of the road network sampling point according to the initial elevation value and the elevation values of the plurality of target terrain sampling points; A generating module is used to determine the target elevation values of the plurality of road network sampling points as the road network elevation data of the target area.
8. An electronic device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the road network elevation data generation method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for generating road network elevation data as described in any one of claims 1 to 6 is implemented.
