Elevation adjustment method and apparatus for terrain data, and program product
By automatically adjusting the elevation of terrain data using high-precision road network data, the problem of elevation inconsistency when fusing terrain data and road network data is solved, improving adjustment efficiency and accuracy, and enhancing the display effect of electronic maps.
Patent Information
- Application Number
- PCT/CN2025/078436
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-28
- Filing Date
- 2025-02-21
- Publication Date
- 2025-12-04
AI Technical Summary
When fusing terrain data and road network data, inconsistencies in elevation due to differences in accuracy can cause the road network to be obscured by the terrain or appear to float above it. Existing technologies require manual adjustments that are inefficient and costly.
The elevation of terrain data is automatically adjusted using high-precision road network data. By acquiring road network data of the area covered by terrain data, the initial elevation of terrain points around the location points in the terrain data is adjusted based on the elevation of the location points recorded in the road network data.
It improves the efficiency of terrain data elevation adjustment, reduces costs, ensures the elevation accuracy of the adjusted terrain data, and improves the display effect of electronic maps.
Smart Images

Figure CN2025078436_04122025_PF_FP_ABST
Abstract
Description
Elevation adjustment methods, devices, and programs for terrain data
[0001] This disclosure claims priority to Chinese Patent Application No. 202410675035.9, filed on May 28, 2024, entitled “Method, Apparatus and Program Product for Elevation Adjustment of Topographic Data”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of geographic information technology, and in particular to a method, apparatus and program product for adjusting the elevation of terrain data. Background Technology
[0003] With the development of technology, the application scenarios of geographic information data are becoming increasingly widespread, with common applications including map navigation, smart city management, and autonomous driving. Geographic information data is categorized into map data, terrain data, and others based on its intended use. In areas with sparse road networks, such as mountainous regions and rural areas, when creating electronic maps, in addition to using road network data from the map data, it is also necessary to incorporate terrain data, such as DEM (Digital Elevation Model), to present the geographical features of the corresponding area in the generated electronic map.
[0004] When the inventors were studying existing geographic information data, they found that map data is divided into standard maps and high-precision maps according to accuracy. The accuracy of road network data in high-precision maps is often at the sub-meter or even centimeter level, while the accuracy of terrain data is usually 30 meters. Due to the difference in accuracy between the data, there is an issue of inconsistent elevation when terrain data and road network data are fused. Taking a DEM (Digital Elevation Model) as an example, a DEM records a limited number of terrain elevations. Suppose there is a terrain region ab in the DEM that covers road AB in the road network data. If two locations in terrain region ab have corresponding terrain elevations, when rendering a terrain map with a road network, interpolation needs to be performed based on the terrain elevations corresponding to the two locations in terrain region ab to generate terrain elevations for other locations in the terrain region. However, since the precision of the locations in the terrain region is different from the precision of the locations in road AB in the road network data, the locations in terrain region ab that match road AB are not actually locations on road AB. Furthermore, the terrain elevations generated by interpolation in existing technologies are inconsistent with the actual elevations. As a result, in the terrain map with a road network rendered by fusing terrain data and road network data, there may be instances where roads in the road network are obscured by the terrain, or roads in the road network float above the terrain.
[0005] In related technologies, modeling tools or plugins are typically used to manually adjust areas of inconsistent elevation, which is time-consuming and particularly inefficient in large-scale production scenarios. Therefore, there is an urgent need to provide an efficient elevation adjustment scheme for terrain data to improve the efficiency of 3D electronic map generation. Summary of the Invention
[0006] This disclosure provides a method, apparatus, and program product for adjusting the elevation of terrain data. By utilizing high-precision road network data, the elevation of terrain data is automatically adjusted, thereby improving the efficiency of elevation adjustment and thus improving the efficiency of 3D map generation.
[0007] In a first aspect, this disclosure provides a method for adjusting the elevation of topographic data, including:
[0008] Obtain the initial elevation of the terrain points recorded in the terrain data;
[0009] Obtain road network data of the geographical area covered by the terrain data from a pre-generated high-precision map. The road network data records the elevation of the road location points.
[0010] Based on the elevation of the location points recorded in the road network data, the initial elevation of the terrain points located around the location points in the terrain data is adjusted.
[0011] Secondly, this disclosure provides an elevation adjustment device for terrain data, comprising:
[0012] The initial elevation acquisition module is used to acquire the initial elevation of terrain points recorded in the terrain data;
[0013] The road network data acquisition module is used to acquire road network data of the geographical area covered by the terrain data from a pre-generated high-precision map. The road network data records the elevation of the location points of the roads.
[0014] The elevation adjustment module is used to adjust the initial elevation of terrain points located around the location points in the terrain data based on the elevation of the location points recorded in the road network data.
[0015] Thirdly, this disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the electronic device to perform the method provided in the first aspect of this disclosure.
[0016] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method provided in the first aspect of this disclosure.
[0017] Fifthly, this disclosure provides a program product including a computer program that, when executed by a processor, implements the method provided in the first aspect of this disclosure.
[0018] The elevation adjustment method, apparatus, and program product for terrain data provided in this disclosure are designed for scenarios where the elevation of terrain data needs to be adjusted. Based on the elevation of location points recorded on roads in the road network data covering the geographical area, the initial elevation of terrain points in the terrain data near those location points is adjusted, thus achieving automatic elevation adjustment of the terrain data. Compared to manual adjustment using plugins or tools, this method is more efficient and less costly. Furthermore, since the elevations of the location points recorded in the road network data are relatively accurate, the accuracy of the adjusted terrain data elevation is also guaranteed. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0020] Figure 1 is a schematic diagram illustrating an inconsistency between the elevation of terrain data and road network data provided in an embodiment of this disclosure;
[0021] Figure 2 is a flowchart illustrating a method for adjusting the elevation of terrain data according to an embodiment of this disclosure;
[0022] Figure 3 is a flowchart illustrating another method for adjusting the elevation of terrain data provided in an embodiment of this disclosure;
[0023] Figure 4 is a schematic diagram of the grid map after loading road network data in the embodiment shown in Figure 3 of this disclosure;
[0024] Figure 5 is a schematic diagram of the elevation of the terrain points after adjustment according to an embodiment of this disclosure;
[0025] Figure 6 is a flowchart illustrating another method for adjusting the elevation of terrain data provided in an embodiment of this disclosure;
[0026] Figure 7 is a schematic diagram of the preset range provided in the embodiments of this disclosure;
[0027] Figure 8 is a schematic diagram of the elevation after adjusting the terrain data provided in the embodiments of this disclosure;
[0028] Figure 9 is a structural schematic diagram of a terrain data elevation adjustment device provided in an embodiment of this disclosure;
[0029] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.
[0030] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0032] First, some of the terms used in this disclosure will be explained:
[0033] Road network: A network of roads consisting of connected points or lines. Data describing the traffic relationships between roads is called road network data.
[0034] DEM (Digital Elevation Model): A digital simulation of ground terrain (i.e., a digital representation of the surface morphology of terrain) is achieved through a finite terrain elevation. It is a physical ground model that represents the ground elevation using an ordered array of numerical values.
[0035] Topographic data: Data describing topographic features or digital representations of topographic features, such as data recorded in a DEM.
[0036] To make electronic maps more closely resemble the real world, terrain data needs to be combined with road network data to display more detailed electronic maps.
[0037] As the accuracy of electronic maps continues to improve, high-precision or high-quality road network data can reach sub-meter or even centimeter levels. Terrain data, however, typically has an accuracy of 30 meters. Due to this difference in accuracy, when terrain data and road network data are combined, elevation discrepancies (unequal elevations) can occur. This can lead to the road network appearing obscured or floating above the terrain when the combined data is displayed.
[0038] For example, Figure 1 is a schematic diagram of an inconsistency between the elevation of terrain data and road network data provided in an embodiment of this disclosure. As shown in Figure 1, the area corresponding to the terrain data and road network data is a mountainous area. The terrain corresponding to the mountain is shown in Figure 1. When the elevation of the terrain data is not adjusted, a part of the road network represented by the road network data (the part corresponding to the dashed line in Figure 1) is obscured by the mountain.
[0039] In related technologies, for areas where the elevations in terrain data and road network data are inconsistent, manual adjustments are often used to ensure that the road network conforms to the terrain surface. However, manual adjustments are inefficient and costly.
[0040] To improve the efficiency of terrain data elevation adjustment, this disclosure provides a method for terrain data elevation adjustment. Based on the elevation of road location points recorded in high-precision road network data of the same geographical area, the initial elevation of terrain points recorded in the terrain data is adjusted, realizing automatic adjustment of terrain data elevation. The method is efficient, low-cost, and ensures the accuracy (quality) of the corrected elevation value.
[0041] Figure 2 is a flowchart illustrating a method for adjusting the elevation of terrain data according to an embodiment of this disclosure. This method can be executed by an electronic device with corresponding data processing capabilities, such as a server or computer. As shown in Figure 2, the method for adjusting the elevation of terrain data includes the following steps:
[0042] Step S201: Obtain the initial elevation of the terrain points recorded in the terrain data.
[0043] The terrain data describes the terrain of a geographic region, including the initial elevation of multiple terrain points within the geographic region.
[0044] For example, the terrain data can be DEM data.
[0045] In some embodiments, terrain data can be stored in the form of a raster map, and the initial elevation of terrain points can be obtained from the raster map of the terrain data. A terrain point is a pixel in the raster map, and the initial pixel elevation of a pixel in the raster map is the initial elevation of the corresponding terrain point.
[0046] The initial elevation is the elevation recorded in the terrain data or its raster map. A pixel in the raster map corresponds to a terrain point in the terrain data, and the initial pixel elevation is the elevation of the corresponding terrain point recorded in the terrain data.
[0047] For the terrain data whose elevation needs to be adjusted, obtain the initial elevation of the terrain points recorded in the terrain data. The terrain data whose elevation needs to be adjusted can be the terrain data corresponding to any specified raster map, or the terrain data of any geographic region.
[0048] In order to improve mapping efficiency, a large geographical area is usually divided into multiple smaller geographical areas. In order to integrate terrain data and road network data and thus create a richer map, the elevation of the terrain data of the divided geographical areas needs to be adjusted. That is, the terrain data of the divided geographical areas are used as the terrain data whose elevation needs to be adjusted.
[0049] After obtaining the raster map of the terrain data, there is a conversion relationship between the color value of a pixel in the raster map and the initial pixel elevation (or the initial elevation of the terrain point corresponding to the pixel). The initial pixel elevation of the pixel can be obtained based on the color value of the pixel in the raster map and this conversion relationship.
[0050] Taking a raster image in RGB (Red-Green-Blue) format as an example, the conversion relationship between the initial pixel elevation h0 and the values of each RGB channel, i.e., r, g, and b, can be expressed as: h0=[round(r×256)×256] 2 +round(g×256)×256+round(b×256)]×0.1 -10000
[0051] Here, round() represents the rounding function.
[0052] When the raster image is in RGBA (Red-Green-Blue-Alpha, red-green-blue-transparency) format, the type of terrain point or geographical region corresponding to a pixel can be determined based on the value of the α channel, i.e., transparency, such as mountains, forests, grasslands, etc.
[0053] Step S202: Obtain road network data of the geographical area covered by the terrain data from the pre-generated high-precision map. The road network data records the elevation of the location points of the roads.
[0054] High-definition maps (HD maps) are maps with higher precision than standard-definition maps (SD maps), and can be maps with sub-meter precision, such as lane-level maps.
[0055] The geographical area covered by terrain data can be based on the latitude and longitude range of the terrain points in the terrain data, or on the geographical area corresponding to the raster map of the terrain data.
[0056] High-precision maps contain road network data for a complete geographic area. The geographic area covered by terrain data is a subset of that complete geographic area. Road network data for the geographic area covered by terrain data can be obtained from the high-precision map data.
[0057] The road network data includes the three-dimensional coordinates of the location points on each road within the corresponding geographical area. These three-dimensional coordinates can be longitude, latitude, and elevation, or coordinates in other coordinate systems. By transforming the three-dimensional coordinates of the location points, the elevation of those locations can be obtained.
[0058] A location point is a point located on a road and is used to represent the road's location and shape (direction). Location points are also called road points or shape points.
[0059] For example, a location point can be a point on the centerline of a road. For high-precision road networks, a location point can be a point on the centerline of a lane or a point on a lane line.
[0060] Step S203: Based on the elevation of the location points recorded in the road network data, adjust the initial elevation of the terrain points located around the location points in the terrain data.
[0061] Terrain points located around the location point can be terrain points within a preset range of distance from the location point, such as terrain points whose distance from the location point is less than or equal to the preset distance.
[0062] Specifically, for each location point recorded in the road network data, the topographic points around that location point are determined; using the elevation of that location point, the initial elevation of the topographic points around that location point is adjusted to obtain the adjusted elevation of the topographic points.
[0063] In some embodiments, the initial elevation of the terrain points around the location point can be adjusted to the difference between the elevation of the location point and a preset value. The preset value can be a small value, such as a value related to the thickness of the road where the location point is located, so that in the electronic map obtained after fusing road network data and terrain data at the adjusted location, the road is attached to the terrain.
[0064] In other embodiments, an elevation threshold for a terrain point can be determined based on the elevation of the location point and the distance between the terrain point and the location point. Under the constraint of the elevation threshold, the initial elevation of the terrain points located around the location point is adjusted so that the adjusted elevation of the terrain points is within the range corresponding to the elevation threshold.
[0065] To facilitate calculations, terrain data and road network data can be loaded into the same space. For example, road network data can be loaded into a raster map of terrain data. For terrain points whose corresponding pixels in the raster map are covered by the image of the road network data (i.e., the road network map), the initial elevation of the terrain point is directly adjusted to the elevation of the location point closest to it. For terrain points whose corresponding pixels are not covered by the road network map but are located around the location point, the initial elevation of the terrain point is adjusted based on the distance between the pixel corresponding to the terrain point and the pixel corresponding to the location point in the road network data, as well as the elevation of the location point.
[0066] Furthermore, after the initial elevation adjustment of the topographic points in the topographic data of the complete geographic region is completed, the topographic data of the complete geographic region after the initial elevation adjustment and the road network data of the complete geographic region are merged to generate an electronic map of the complete geographic region, so as to display the topographic map and road network map of the complete geographic region through the electronic map.
[0067] The elevation adjustment method for terrain data provided in this embodiment addresses scenarios where elevation adjustments are needed. It implements a scheme for automatically adjusting terrain data elevation based on road network data. Specifically, it adjusts the initial elevation of terrain points near the recorded road locations in the road network data of the geographical area covered by the terrain data, based on the elevation of the road points. This achieves automatic elevation adjustment of the terrain data. Compared to manual adjustments using plugins or tools, this method is more efficient, less costly, and ensures the accuracy of the elevation in the terrain data.
[0068] Optionally, the method further includes:
[0069] For terrain data whose elevation needs to be adjusted, the road network density of the road network data in the geographical area covered by the terrain data is obtained; if the road network density is lower than a preset level, the step of obtaining the initial elevation of the terrain points recorded in the terrain data is executed; if the road network density is higher than or equal to the preset level, the elevation of the terrain data is determined based on the elevation of the location points recorded in the road network data.
[0070] Figure 3 is a flowchart illustrating another method for adjusting the elevation of terrain data provided in this embodiment. This embodiment is a further refinement of steps S201 and S203 based on the embodiment shown in Figure 2. A raster map acquisition step is added before step S201, and a road network data loading to the raster map and pixel distance determination step is added after step S202. As shown in Figure 3, the method for adjusting the elevation of terrain data provided in this embodiment may specifically include the following steps:
[0071] Step S301: Obtain a raster map of the terrain data.
[0072] In a raster image, one pixel corresponds to one terrain point in the terrain data.
[0073] Step S302: Obtain the initial pixel elevation of the terrain points recorded in the terrain data from the raster image.
[0074] When adjusting the elevation of terrain data, adjustments can be made on a raster basis. For each frame of the raster data describing the terrain data, the pixel elevation of each pixel is calculated based on parameters such as color value and transparency of each pixel in that frame of the raster data. This yields the initial pixel elevation of the terrain point corresponding to each pixel. The initial pixel elevation of a terrain point can be equal to or approximately equal to the initial elevation of that terrain point.
[0075] Step S303: Obtain road network data of the geographical area covered by the terrain data from the pre-generated high-precision map.
[0076] Step S304: Based on the coordinates of the location points in the acquired road network data, the road network data is loaded into the raster map to obtain the pixel coordinates and pixel elevation of the location points in the road network data.
[0077] Road network data for the same area as the terrain data is loaded into the corresponding raster map of the terrain data. This overlays the road network map onto the raster map, where each pixel in the road network map represents a location point. The pixel coordinates and elevation of each pixel in the road network map correspond to the pixel coordinates and elevation of the location point. Based on these pixel coordinates, terrain points surrounding the location point can be identified.
[0078] Pixel elevation can be calculated using parameters such as pixel color value and transparency. Pixel elevation refers to the elevation represented by the pixel corresponding to a location point in a road network map, and its value is equal to or approximately equal to the elevation of that location point.
[0079] Specifically, based on the area represented by the terrain data, road network data for that area can be retrieved from the road network database. The retrieved road network data for the same area is then loaded into the raster map corresponding to the terrain data. This allows the images of each point in the road network data to be drawn at the corresponding locations in the raster map, effectively creating a road network map corresponding to the road network data. The pixels included in the road network map represent the images of points located on the roads within the road network.
[0080] Road network data can be road network data stored in a high-precision map database, referred to as high-precision road network data.
[0081] When loading raster maps into road network data, loading can be done according to latitude and longitude. In a raster map, one pixel corresponds to a terrain point, which is used to describe the initial elevation of the point at the corresponding latitude and longitude. When loading road network data, the image of the location point can be added to the corresponding location in the raster map based on the latitude and longitude of the location point in the road network data, thus realizing the overlay of the road network map on the raster map.
[0082] For example, Figure 4 is a schematic diagram of the raster map after loading road network data in the embodiment shown in Figure 3 of this disclosure. As shown in Figure 4, the raster map is in rgba format. The raster map before loading the road network data is generated based on terrain data and is used to represent the terrain of the corresponding geographical area through color and transparency, that is, the initial elevation of the terrain points on the geographical area. After loading the road network data into the raster map, the part of the raster map covered by the road network data (the part circled in the box in Figure 4) changes, and the road network map corresponding to the road network data is superimposed on it.
[0083] Step S305: For terrain points located around the location point, determine the pixel distance between the terrain point and the location point based on the number of pixels between the pixels corresponding to the terrain point and the pixels corresponding to the location point.
[0084] For each location point in the road network data, the terrain points surrounding that location point are determined based on its pixel coordinates. Specifically, for each location point in the road network data, a preset area of rectangle, circle, or other shape is drawn in the raster map with that location point as the center. The terrain points corresponding to the pixels within this preset area are the terrain points surrounding that location point.
[0085] In some embodiments, pixels located within a preset area of a location point do not include pixels covered by a road network map.
[0086] After loading the road network data and terrain data into the same space, i.e. the space corresponding to the raster map, the terrain points around the location point are obtained based on the distance between the terrain point and the location point in this space. For the terrain points around the location point, the number of pixels through which the line connecting the pixel corresponding to the terrain point and the pixel corresponding to the location point passes is determined, and the pixel distance between the terrain point and the location point is obtained, providing a data basis for subsequent initial elevation adjustment.
[0087] For example, the pixel distance between a terrain point and a location point can be the number of pixels traversed by the line connecting the pixel corresponding to the terrain point and the pixel corresponding to the location point minus 1.
[0088] Step S306: Based on the pixel elevation of the location point recorded in the road network data and the pixel distance between the terrain point and the location point, adjust the initial pixel elevation of the terrain points located around the location point in the raster map.
[0089] For terrain points whose corresponding pixels are covered by the road network map, adjust the initial elevation of the terrain point to the pixel elevation of the road point closest to it. This allows us to determine the location point with the smallest distance between the corresponding pixel and the corresponding pixel of the terrain point; this is the closest location point to the terrain point.
[0090] For shape points located around a location point that are not covered by the road network map, an elevation threshold for the shape point can be determined based on the pixel distance between the shape point and the location point, as well as the pixel elevation of the location point. The initial pixel elevation of the shape point can then be adjusted based on this elevation threshold so that the adjusted elevation is within the range corresponding to the elevation threshold.
[0091] For example, Figure 5 is a schematic diagram of the adjusted elevation of terrain points provided in an embodiment of this disclosure. As shown in Figure 5, the road network map is represented by a dashed box, while the pixels corresponding to the terrain points in the raster map are represented by solid boxes, and the numbers on the solid boxes are the corresponding pixel numbers. As can be seen from Figure 5, the road network map covers four pixels in the raster map, namely pixels 51, 52, 54, and 55. Assuming that the pixel elevation of each location point on the road network map is 50 meters, the adjusted elevation of the terrain points corresponding to pixels 51, 52, 54, and 55 is also 50 meters. Other pixels in the raster map that are located around the location points in the road network map but are not covered by the road network map, namely pixels 53, 56, and pixels 57 to 59, can determine the range of elevation of the terrain point, such as [45 meters, 55 meters], based on the pixel elevation of the location point in the road network map (50 meters) and the pixel distance between the terrain point and the nearest location point.
[0092] If the pixel corresponding to the terrain point is within a preset range of pixels corresponding to multiple location points, the adjusted elevation of the terrain point can be determined to be the minimum value among the pixel elevations of the multiple location points. Alternatively, based on the pixel elevations of each location point and the pixel distance between the terrain point and the location point, an elevation threshold at that location point can be obtained. By intersecting the intervals corresponding to multiple elevation thresholds, the initial pixel elevation of the terrain point can be adjusted to obtain the adjusted elevation of the terrain point.
[0093] If there are multiple terrain points within the preset range of the pixel corresponding to the location point, the initial pixel elevation of the multiple terrain points can be adjusted based on the pixel elevation of the location point and the pixel distance between each terrain point and the location point.
[0094] For methods that adjust the initial pixel elevation of multiple terrain points based on the elevation of a single location point, the initial pixel elevation of the multiple terrain points can be adjusted to the pixel elevation of the location point. Alternatively, an elevation threshold for the terrain point can be determined based on the pixel distance and the pixel elevation of the location point, thereby achieving a gradual change in the elevation of the terrain point after adjustment with the pixel distance, such as linear or non-linear gradual changes.
[0095] Specifically, the elevation threshold of a terrain point can be determined based on the pixel elevation of the location point in the road network data, as well as the positional relationship between the pixel corresponding to the location point and the pixel corresponding to the terrain point, such as pixel distance and line distance.
[0096] The elevation threshold includes an upper elevation limit and a lower elevation limit. If the initial pixel elevation of a terrain point is greater than the upper elevation limit, the initial pixel elevation of the terrain point is adjusted to the upper elevation limit; if the initial pixel elevation of a terrain point is less than the lower elevation limit, the initial pixel elevation of the terrain point is adjusted to the lower elevation limit, thereby making the terrain fit the road network as much as possible while maintaining the original terrain characteristics.
[0097] In this embodiment, by loading road network data from the same area as the terrain data into the raster map of the terrain data, it is convenient to calculate the pixel distance between terrain points and location points. At the same time, it is easy to quickly determine the terrain points around the location point on the road. Thus, by using the pixel distance and the elevation of the location point, the initial elevation of the terrain points around the location point can be adjusted, thereby improving the efficiency of elevation adjustment.
[0098] Optionally, the method further includes:
[0099] An electronic map of the target area is generated based on the terrain data with adjusted elevation corresponding to the target area and the road network data corresponding to the target area.
[0100] The target area can be any area, such as a square area, an irregularly shaped area, etc. The target area can be defined by the user on an electronic map generated from road network data or unadjusted terrain data, or selected from multiple areas provided in the corresponding configuration interface.
[0101] By adjusting the elevation of terrain data based on high-precision road network data, the roads in areas where both terrain and road network coexist in the generated electronic map of the corresponding region are aligned with the terrain, thus improving the display effect of the electronic map.
[0102] Figure 6 is a flowchart illustrating another method for adjusting the elevation of terrain data provided in this embodiment. This embodiment is a further refinement of step S306 based on the embodiment shown in Figure 3. A step to determine whether to perform terrain data elevation adjustment is added before step S301, and a step to determine a preset range is added after step S304.
[0103] As shown in Figure 6, the elevation adjustment method for terrain data provided in this embodiment may specifically include the following steps:
[0104] Step S601: For the terrain data whose elevation needs to be adjusted, obtain the road network density of the road network data of the geographical area covered by the terrain data.
[0105] Among them, road network density is used to describe the density of road network distribution within a unit area, and can be expressed by the proportion of road network area within a unit area, the number of roads, etc.
[0106] Based on the road network data, the proportion of the road network area in the road network map can be determined, thereby obtaining the road network density of the area corresponding to the road network data.
[0107] The number of roads in a corresponding area can be determined based on road network data, thus obtaining the road network density of that area.
[0108] Step S602: Determine whether the density of the road network is lower than a preset level; if yes, proceed to step S603; if no, proceed to step S610.
[0109] Step S603: Obtain a raster map of the terrain data, and obtain road network data of the geographical area covered by the terrain data from a pre-generated high-precision map.
[0110] When the road network density in a region is low, i.e. below a preset level, a raster map of the terrain data for that region is obtained, and the pixel elevation of the pixels in the raster map is calculated to obtain the initial pixel elevation of the terrain point corresponding to the pixel. The initial pixel elevation is then adjusted based on the elevation of the road network data.
[0111] The road network density being lower than the preset level can be specifically defined as follows: the road network area ratio is less than the preset ratio, such as 30%, 50%, or other ratios, or the ratio of the number of roads in the area to the area of the area is less than the preset ratio.
[0112] Step S604: Obtain the initial pixel elevation of the terrain points recorded in the terrain data from the raster image.
[0113] Step S605: Based on the coordinates of the location points in the acquired road network data, the road network data is loaded into the raster map to obtain the pixel coordinates and pixel elevation of the location points in the road network data.
[0114] Step S606: Obtain the actual distance represented by the pixels in the raster image, and determine the preset range based on the actual distance represented by the pixels and the preset radiation distance, and determine the terrain points corresponding to the pixels in the raster image that are located within the preset range of the pixels corresponding to the location point, which are the terrain points located around the location point.
[0115] The actual distance represented by pixels can be obtained by dividing the actual distance represented by the raster image by the number of pixels in the raster image in the corresponding direction.
[0116] For an electronic map with a tile level of 14, one tile corresponds to one raster image. Assuming the raster image contains 256*256 pixels, the actual distance represented by the raster image is the Earth's circumference / 2. 14 Then the actual distance represented by a single pixel in the raster image is the Earth's circumference / (2 14 ×256) = Earth's circumference / 222 It is approximately 9.5 meters long.
[0117] The preset range is used to describe the range of pixels surrounding the pixel corresponding to the location point.
[0118] Radiation distance is a configurable parameter. The smaller the radiation distance, the fewer the initial elevations or initial pixel elevations of the terrain data need to be adjusted, and the higher the adjustment efficiency.
[0119] The preset range can be determined based on the ratio of the preset radiation distance to the actual distance represented by a single pixel in the raster image.
[0120] Taking a radiation distance of 30 meters and an actual distance of 8 meters represented by a single pixel in the raster image as an example, the terrain points around the location point, i.e., the terrain points within the preset range of the location point, should meet the following requirement: in the raster image, the distance between the pixel corresponding to the terrain point and the pixel corresponding to the location point should be less than or equal to 3.75 pixels.
[0121] Divide the preset radiation distance by the actual distance represented by the pixels in the raster image and round down, such as rounding down, rounding up, or rounding to the nearest integer, to obtain the number of pixels corresponding to the radiation distance. This gives the preset range, where the distance between the pixels within the preset range of the pixels corresponding to the location point and the pixels corresponding to that location point is less than or equal to the number of pixels corresponding to the radiation distance.
[0122] Taking a radiation distance of 30 meters and an actual distance represented by a pixel of 8 meters as an example, the integer obtained by dividing the radiation distance by the actual distance represented by the pixel and rounding it up is 4. Then, the terrain points corresponding to the pixels in the raster map whose distance from the pixel corresponding to the location point is less than or equal to 4 pixels are determined as the terrain points around the location point.
[0123] The distance between two pixels can be understood as the length of the line connecting the centers of the two pixels, converted into the number of pixels.
[0124] After loading road network data into the raster map to obtain the road network map, the pixel coordinates and pixel elevations of each location point in the road network data are obtained. Then, based on the pixel coordinates of the location point and the determined preset range, the pixels falling within the preset range of the pixel corresponding to the location point are determined. Based on the correspondence between pixels and terrain points, the terrain map around the location point is obtained. By traversing each location point in the road network data, the terrain points around each location point can be obtained.
[0125] Pixel coordinates are the coordinates in the image coordinate system where the raster image is located. The distance between two pixels can be the distance between two coordinate points, such as Euclidean distance.
[0126] For example, Figure 7 is a schematic diagram of the preset range provided in an embodiment of this disclosure. As shown in Figure 7, taking the preset range as an example where the distance between a pixel and the pixel corresponding to the location point should be less than or equal to 2 pixels, and the road point is pixel 70, the corresponding preset range is shown as the dashed box or dashed circle in Figure 7. Pixels located within the preset range of the pixel corresponding to the location point can be pixels that intersect with the preset range of the pixel corresponding to the location point.
[0127] Step S607: For terrain points located around the location point, determine whether the pixel distance between the terrain point and the location point is greater than a preset distance; if yes, proceed to step S608; if no, proceed to step S609.
[0128] Step S608: Based on the pixel elevation of the location point and the pixel distance between the terrain point and the location point, determine the elevation threshold of the terrain point, and adjust the initial pixel elevation of the terrain point based on the elevation threshold of the terrain point.
[0129] Step S609: Adjust the initial pixel elevation of the terrain point to the pixel elevation of the location point.
[0130] The pixel distance between a terrain point and a location point can be the length of the line connecting the center of the pixel corresponding to the terrain point to the center of the pixel corresponding to the location point, which is the length of the line described in pixels. Alternatively, it can be the difference obtained by subtracting 1 from the number of pixels the line passes through.
[0131] An elevation threshold is used to limit the range of initial pixel elevations and may include an upper elevation limit and / or a lower elevation limit.
[0132] The steps for adjusting the initial pixel elevation of a terrain point based on its elevation threshold specifically include: if the initial pixel elevation of the terrain point is greater than the upper limit of the elevation threshold, then the elevation of the terrain point is adjusted to the upper limit; if the initial pixel elevation of the terrain point is less than the lower limit of the elevation threshold, then the elevation of the terrain point is adjusted to the lower limit; if the initial pixel elevation of the terrain point is within the range corresponding to the elevation threshold, that is, greater than or equal to the lower limit and less than or equal to the upper limit, then there is no need to adjust the initial pixel elevation of the terrain point.
[0133] For example, the expression for the upper elevation limit `maxH` can be: `maxH = H + f(d)`, and the expression for the lower elevation limit `minH` can be: `minH = Hf(d)`, where H represents the pixel elevation of the location point, d represents the pixel distance between the terrain point and the location point, and f(d) represents a function of d, with a value greater than or equal to 0. The function f(d) can be any function of distance d with a value greater than or equal to 0, such as a linear function, a nonlinear function, etc.
[0134] When a terrain point is located within a preset range of m location points, and the pixel distance between the terrain point and each of the i location points is greater than a preset distance (i is a positive integer less than or equal to m and greater than 1), for each of the i location points, based on the pixel elevation of the location point and the pixel distance between the terrain point and the location point, an elevation threshold for the terrain point at that location point is determined, resulting in i sets of elevation thresholds. The minimum upper elevation value among the i sets of elevation thresholds is taken as the upper elevation limit of the terrain point, and the maximum lower elevation value among the i sets of elevation thresholds is taken as the lower elevation limit of the terrain point. The initial pixel elevation of the terrain point is adjusted based on the upper and lower elevation limits. If the lower elevation limit of the terrain point is greater than the upper elevation limit, then the minimum pixel elevation among the i location points is taken as the elevation of the terrain point.
[0135] To save computation, for each road in the road network map, it can be determined whether the pixel corresponding to the terrain point is within a preset range of the pixel corresponding to the nearest position point on that road. If so, the terrain point is determined as a terrain point in the vicinity of that position point. This process is repeated for each road and each terrain point, thereby avoiding the use of multiple position points on the same road to adjust the elevation of the terrain point and simplifying the calculation.
[0136] In other embodiments, if the same terrain point is located around multiple location points, a location point is selected from the multiple location points and denoted as the target location point. For example, the location point closest to the terrain point or the location point with the smallest elevation is selected. Based on the pixel elevation of the target location point and the judgment result of the pixel distance between the terrain point and the target location point and the preset distance, the initial pixel elevation of the terrain point is adjusted.
[0137] Optionally, if a terrain point is located around multiple location points, its initial pixel elevation is adjusted based on the minimum pixel elevation among these multiple location points and the pixel distance between the terrain point and the location point with the minimum pixel elevation. This can be achieved by determining an elevation threshold or directly modifying the terrain point's elevation to the minimum pixel elevation among these multiple location points. Selecting the location point with the minimum pixel elevation as the target location point avoids the terrain from obscuring the road network due to excessively high elevation, thus preventing the road network from being incompletely displayed on the electronic map.
[0138] When a terrain point corresponds to multiple sets of elevation thresholds, the initial pixel elevation of the terrain point is adjusted based on the set obtained by the intersection, union, or other operations of the elevation ranges corresponding to the multiple sets of elevation thresholds.
[0139] For example, if a certain terrain point (with an initial pixel elevation of 20 meters) corresponds to 3 sets of elevation thresholds, namely [30 meters, 66 meters], [25 meters, 50 meters] and [40 meters, 72 meters], then the elevation of the terrain point is adjusted to 25 meters as the union of these three sets, i.e., [25 meters, 72 meters].
[0140] When the road network density is higher than or equal to the preset level, it indicates that the road network data is relatively dense and sufficient. Therefore, the elevation in the terrain data can be discarded, and the elevation of the terrain data can be generated directly based on the elevation of the location points in the road network data.
[0141] Step S610: Determine the elevation of the terrain data based on the elevation of the location points recorded in the road network data.
[0142] Interpolation can be used to interpolate the elevations of location points recorded in the road network data. Based on the interpolated elevations, the elevations of topographic points in the topographic data can be obtained. The elevation obtained after interpolation that is at the same latitude and longitude as or close to the topographic point can be determined as the elevation of the topographic point.
[0143] For geographical areas with dense road networks, such as built-up areas, the elevations recorded in the terrain data or raster map, i.e. the aforementioned initial elevations or initial pixel elevations, are discarded. The high-precision elevations in the road network data are directly used to generate the elevations in the terrain data, which improves the efficiency of elevation generation. At the same time, because the road network data has high precision, the accuracy of the terrain data elevations is improved.
[0144] In this embodiment, for areas with sparse road networks (i.e., areas where the road network density is lower than a preset level), the elevation of the terrain data is adjusted using the elevation data from high-precision road network data. For areas with dense road networks (i.e., areas where the road network density is not lower than a preset level), the elevation of the terrain data is discarded, and the elevation of the terrain data is regenerated based on the elevation data from the road network data. Different methods are used to determine the elevation of the terrain data, which improves the accuracy of the terrain data elevation, increases the efficiency of terrain data elevation generation in dense road network areas, and reduces the amount of computation. When adjusting the elevation of the terrain data based on the elevation data from the road network data, for shape points located around and close to the location point on the road (i.e., shape points with a pixel distance less than a preset distance), their elevation is directly adjusted to the elevation of the location point, which is computationally inefficient. For shape points located around but far from the location point, an elevation threshold is reasonably determined using the pixel elevation of the location point and the pixel distance between the shape point and the location point, thereby limiting the elevation of the terrain point to the range corresponding to the elevation threshold. This maintains the original shape characteristics of the terrain while avoiding terrain occlusion of the road network. The configurable preset range enhances the flexibility of elevation adjustment control, adapts to different elevation adjustment needs, and expands the application scope.
[0145] Optionally, the elevation threshold includes an upper elevation limit and a lower elevation limit. The elevation threshold of the terrain point is determined based on the pixel elevation of the location point and the pixel distance between the terrain point and the location point, including:
[0146] Based on the pixel distance between the terrain point and the location point, the gradient pixel elevation is determined; the upper limit of the elevation of the terrain point is determined to be the pixel elevation of the location point plus the gradient pixel elevation, and the lower limit of the elevation of the terrain point is the pixel elevation of the location point minus the gradient pixel elevation.
[0147] The pixel distance between a terrain point and a road point can be the number of pixels that the line connecting the location point's pixel or the center of its pixel to the center of the corresponding pixel of the terrain point passes through, or the number of pixels that the line passes through minus 1.
[0148] Specifically, the distance between terrain points and road points can be determined based on the pixel distance between them; and the gradient elevation can be determined based on the distance between terrain points and road points.
[0149] The distance between a terrain point and a location point can be the product of the pixel distance between the terrain point and the location point and the actual distance represented by the pixels.
[0150] In other embodiments, the distance d between a terrain point and a location point can be expressed as: d = (Nn) × d0. Where N is the pixel distance between the terrain point and the location point, d0 is the actual distance represented by a single pixel in the raster image, and n is a constant between 0 and 1, such as 0.5.
[0151] Gradual elevation is the elevation that changes with the pixel distance or distance between the terrain point and the location point.
[0152] For example, the gradient elevation can be positively correlated with pixel distance or distance, such as increasing linearly with increasing pixel distance or distance.
[0153] The gradual elevation can be calculated based on the pre-designed relationship expression f(d) between the gradual elevation and the distance d between the terrain point and the location point. The value of this relationship expression should be greater than or equal to 0.
[0154] Because roads have a certain width, a location point may be located on the left, right, or in the middle of the road. When determining the gradient elevation, the influence of the road width also needs to be considered. That is, the gradient elevation is determined based on the distance d between the terrain point and the location point, and the width w of the road where the location point is located.
[0155] For example, the gradual elevation can be k(d–w / 2), where k is a constant greater than 0.
[0156] By setting a gradual elevation, the adjusted portion of the terrain elevation can conform to certain rules, such as changing linearly with distance, thus making the terrain in the drawn electronic map more aesthetically pleasing without obscuring the road network.
[0157] Optionally, the gradient elevation is determined based on the pixel distance between the terrain point and the location point, including:
[0158] Based on the pixel distance between the terrain point and the location point and the actual distance represented by the pixels in the raster image, the distance between the terrain point and the location point is determined; the road width of the road where the location point is located is obtained; the difference between the distance between the terrain point and the location point minus half of the road width is multiplied by the tangent of a preset angle to obtain the gradient pixel elevation.
[0159] The expression for gradual elevation is: (d–w / 2)×tanθ, where θ is the preset angle. The preset angle is a configurable parameter, and its value ranges from (0° to 90°). Since d is greater than half the road width, i.e., w / 2, the expression for gradual elevation shows that the value of gradual elevation is greater than 0.
[0160] In a triangle formed by a gradual elevation and (d–w / 2) as two legs, the preset angle is the angle between the hypotenuse of the triangle and the leg corresponding to (d–w / 2). The larger the preset angle, the steeper the hypotenuse of the triangle; the smaller the preset angle, the gentler the hypotenuse of the triangle.
[0161] As shown in the expression for gradual elevation, a larger preset angle results in a larger gradual elevation, a larger upper elevation limit, and a smaller lower elevation limit. This means a larger range corresponding to the elevation threshold, a lower probability of adjusting the elevation of terrain points in the terrain data, and a steeper slope after adjustment. Conversely, a smaller preset angle results in a higher probability of adjusting the elevation of terrain points in the terrain data, and a gentler slope after adjustment. A preset angle can be set based on the needs for elevation adjustment.
[0162] For example, Figure 8 is a schematic diagram of the adjusted elevation of the terrain data provided in this embodiment of the present disclosure. As shown in Figure 8, in the electronic map obtained under the initial elevation of the terrain data, road 80 in the road network data is obscured by mountain 81. The solid dots in Figure 8 represent the pixels corresponding to the terrain points in the raster image. After determining the upper and lower limits of the terrain points using the gradual elevation calculated based on the relation (d–w / 2)×tanθ and the elevation or pixel elevation of the location points in the road network data, the initial elevation in the terrain data is adjusted based on these upper and lower limits. As shown in Figure 8, the portion of road 80 obscured by mountain 81 after adjustment is trapezoidal, and mountain 81 fits snugly against road 80, thus allowing the user to see road 80 in the electronic map.
[0163] The preset angle can be determined based on the scene corresponding to the terrain data and road network data. For example, the preset angle is larger in mountainous scenes and smaller in built-up area scenes.
[0164] Optionally, the value of the preset angle is related to the type of road where the location point is located.
[0165] Optionally, the method further includes:
[0166] The preset angle is determined based on the type of road where the location point is located.
[0167] Road types can be categorized by their road structure, road classification, or the environment in which they are located. For example, highways and expressways have larger preset angles, while urban roads have smaller preset angles.
[0168] Preset angles can be configured for various types of roads in advance to obtain a preset angle table. When adjusting the elevation, the preset angle corresponding to the road where the current location point is located can be directly found from the preset angle table, and the gradual elevation can be calculated based on the preset angle.
[0169] In some embodiments, the preset angle corresponding to the road can be determined by identifying the terrain features on both sides of the road in the actual photos within the area where the terrain data is located, thereby improving the accuracy of the preset angle setting.
[0170] By setting an adaptive preset angle, the accuracy of the adjusted elevation with the actual terrain is improved, making the display effect of the electronic map that integrates terrain data and road network data closer to the real world.
[0171] It should be noted that the execution order of the steps shown in the accompanying drawings is merely an example. The steps executed in parallel in the drawings can also be executed sequentially in a certain order. The steps executed sequentially in the drawings can also be executed in parallel to improve efficiency, or the execution order of some steps can be adjusted, without affecting the logic. For example, steps S604 and S605 can be executed in parallel, and steps S201 and S202 can also be executed in parallel, or step S202 can be executed first and then step S201 can be executed.
[0172] Figure 9 is a schematic diagram of the structure of a terrain data elevation adjustment device provided in an embodiment of the present disclosure. As shown in Figure 9, the device includes: an initial elevation acquisition module 910, a road network data acquisition module 920, and an elevation adjustment module 930.
[0173] The initial elevation acquisition module 910 is used to acquire the initial elevation of the terrain points recorded in the terrain data; the road network data acquisition module 920 is used to acquire the road network data of the geographical area covered by the terrain data from a pre-generated high-precision map, wherein the road network data records the elevation of the location points of the roads; the elevation adjustment module 930 is used to adjust the initial elevation of the terrain points located around the location points in the terrain data based on the elevation of the location points recorded in the road network data.
[0174] Optionally, the elevation adjustment device for the terrain data also includes:
[0175] A road network density acquisition module is used to acquire the road network density of the road network data of the geographical area covered by the terrain data for which the elevation is to be adjusted; and a terrain elevation determination module is used to determine the elevation of the terrain data based on the elevation of the location points recorded in the road network data if the road network density is higher than or equal to the preset level.
[0176] Correspondingly, the initial elevation acquisition module 910 is specifically used for:
[0177] If the density of the road network is lower than a preset level, the initial elevation of the terrain points recorded in the terrain data is obtained.
[0178] Optionally, the elevation adjustment device for the terrain data also includes:
[0179] The raster acquisition module is used to acquire a raster image of the terrain data before acquiring the initial elevation of the terrain points recorded in the terrain data; one pixel in the raster image corresponds to one terrain point in the terrain data.
[0180] Correspondingly, the initial elevation acquisition module 910 is specifically used for:
[0181] From the raster image, obtain the initial pixel elevation of the terrain points recorded in the terrain data.
[0182] Optionally, the elevation adjustment device for the terrain data also includes a pixel distance determination module, used for:
[0183] After obtaining road network data of the geographical area covered by the terrain data from the pre-generated high-precision map, the road network data is loaded into the raster map based on the coordinates of the location points in the obtained road network data to obtain the pixel elevation of the location points in the road network data; for terrain points located around the location points, the pixel distance between the terrain point and the location point is determined based on the number of pixels between the pixels corresponding to the terrain point and the pixels corresponding to the location point.
[0184] Correspondingly, the elevation adjustment module 930 is specifically used for:
[0185] Based on the pixel elevation of the location point recorded in the road network data, and the pixel distance between the terrain point and the location point, the initial pixel elevation of the terrain points located around the location point in the raster map is adjusted.
[0186] Optionally, the elevation adjustment device for the terrain data also includes a surrounding terrain point determination module, used for:
[0187] After loading the road network data into the raster map based on the coordinates of the location points in the road network data, the actual distance represented by the pixels in the raster map is obtained; based on the actual distance represented by the pixels and the preset radiation distance, a preset range is determined; the terrain points corresponding to the pixels in the raster map that are located within the preset range of the pixels corresponding to the location point are determined as terrain points located around the location point.
[0188] Optional, the elevation adjustment module 930 includes:
[0189] An elevation threshold determination unit is used to determine an elevation threshold for a terrain point located around a location point in the road network data record if the pixel distance between the terrain point and the location point is greater than a preset distance. The first adjustment unit is used to adjust the initial pixel elevation of the terrain point based on the elevation threshold of the terrain point.
[0190] Optionally, the elevation adjustment module 930 also includes a second adjustment unit for:
[0191] For terrain points located around the location point recorded in the road network data, if the pixel distance between the terrain point and the location point is less than or equal to the preset distance, the elevation of the initial pixel terrain data of the terrain point is adjusted to the pixel elevation of the location point.
[0192] Optionally, the elevation threshold determination unit includes:
[0193] The gradual elevation determination subunit is used to determine the gradual elevation based on the pixel distance between the terrain point and the location point if the pixel distance between the terrain point and the location point is greater than a preset distance. The upper and lower limit determination subunit is used to determine the upper limit of the elevation of the terrain point as the pixel elevation of the location point plus the gradual elevation, and the lower limit of the elevation of the terrain point as the pixel elevation of the location point minus the gradual elevation.
[0194] Optional, gradual elevation determination sub-unit, specifically used for:
[0195] For terrain points located around the location points recorded in the road network data, if the pixel distance between the terrain point and the location point is greater than a preset distance, the distance between the terrain point and the location point is determined based on the pixel distance between the terrain point and the location point and the actual distance represented by the pixels in the raster image; the road width of the road where the location point is located is obtained; the product of the difference between the distance between the terrain point and the location point minus half of the road width and the tangent of the preset angle is calculated to obtain the gradual elevation.
[0196] The elevation adjustment device for terrain data provided in this embodiment can be used to execute the elevation adjustment method for terrain data provided by the user terminal in any of the above embodiments of this disclosure. The implementation principle and technical effect are similar, and will not be repeated here.
[0197] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. As shown in Figure 10, the electronic device of this embodiment may include: at least one processor 1001; and a memory 1002 communicatively connected to the at least one processor; wherein, the memory 1002 stores instructions executable by the at least one processor 1001, and the instructions are executed by the at least one processor 1001 to cause the electronic device to perform the method described in any of the above embodiments.
[0198] Optionally, the memory 1002 can be either standalone or integrated with the processor 1001.
[0199] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.
[0200] This disclosure also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods described in any of the foregoing embodiments.
[0201] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the foregoing embodiments.
[0202] In the several embodiments provided in this disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.
[0203] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this disclosure.
[0204] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor. The memory may include RAM (Random Access Memory), and may also include NVM (Non-Volatile Memory), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk, or optical disc, etc.
[0205] The aforementioned storage media can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0206] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.
[0207] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0208] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0209] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0210] The above are merely preferred embodiments of this disclosure and do not limit the patent scope of this disclosure. Any equivalent structural or procedural transformations made using the content of this disclosure and its drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this disclosure.
Claims
1. A method of adjusting the elevation of terrain data, wherein, include: Obtain the initial elevation of the terrain points recorded in the terrain data; Obtain road network data of the geographical area covered by the terrain data from a pre-generated high-precision map. The road network data records the elevation of the road location points. Based on the elevation of the location points recorded in the road network data, the initial elevation of the terrain points located around the location points in the terrain data is adjusted.
2. The method according to claim 1, wherein, The method further includes: For the terrain data whose elevation needs to be adjusted, obtain the road network density of the road network data of the geographical area covered by the terrain data; If the density of the road network is lower than a preset level, then the step of obtaining the initial elevation of the terrain points recorded in the terrain data is executed; If the density of the road network is higher than or equal to the preset density, the elevation of the terrain data is determined based on the elevation of the location points recorded in the road network data.
3. The method according to claim 1 or 2, wherein, Before obtaining the initial elevation of the terrain points recorded in the terrain data, the method further includes: Obtain a raster image of the terrain data; one pixel in the raster image corresponds to one terrain point in the terrain data. The acquisition of the initial elevation of the terrain points recorded in the terrain data specifically includes: From the raster image, obtain the initial pixel elevation of the terrain points recorded in the terrain data; After obtaining road network data for the geographic area covered by the terrain data from a pre-generated high-precision map, the method further includes: Based on the coordinates of the location points in the acquired road network data, the road network data is loaded into the raster map to obtain the pixel elevation of the location points in the road network data; For terrain points located around a location point, the pixel distance between the terrain point and the location point is determined based on the number of pixels between the pixels corresponding to the terrain point and the pixels corresponding to the location point. The adjustment of the initial elevation of terrain points surrounding the location point in the terrain data, based on the elevation of the location points recorded in the road network data, specifically includes: Based on the pixel elevation of the location point recorded in the road network data, and the pixel distance between the terrain point and the location point, the initial pixel elevation of the terrain points located around the location point in the raster map is adjusted.
4. The method according to claim 3, wherein, After loading the road network data into the raster map based on the coordinates of the location points in the acquired road network data, the method further includes: Obtain the actual distance represented by the pixels in the raster image; Based on the actual distance represented by the pixels and the preset radiation distance, a preset range is determined; The terrain points corresponding to the pixels within the preset range of the pixels corresponding to the location point in the raster image are determined to be terrain points located around the location point.
5. The method according to claim 3 or 4, wherein, Based on the pixel elevation of the location point recorded in the road network data, and the pixel distance between the terrain point and the location point, the initial pixel elevation of the terrain points located around the location point in the raster map is adjusted, including: For terrain points located around the location points recorded in the road network data, if the pixel distance between the terrain point and the location point is greater than a preset distance, then the elevation threshold of the terrain point is determined based on the pixel elevation of the location point and the pixel distance between the terrain point and the location point. Adjust the initial pixel elevation of the terrain point based on its elevation threshold.
6. The method according to claim 5, wherein, The method further includes: If the pixel distance between the terrain point and the location point is less than or equal to the preset distance, then the elevation of the initial pixel terrain data of the terrain point is adjusted to the pixel elevation of the location point.
7. The method according to claim 5 or 6, wherein, The elevation threshold includes an upper elevation limit and a lower elevation limit. Based on the pixel elevation of the location point and the pixel distance between the terrain point and the location point, the elevation threshold of the terrain point is determined, including: The gradient elevation is determined based on the pixel distance between the terrain point and the location point; The upper limit of the elevation of the terrain point is determined to be the pixel elevation of the location point plus the gradient elevation, and the lower limit of the elevation of the terrain point is the pixel elevation of the location point minus the gradient elevation.
8. The method according to claim 7, wherein, Based on the pixel distance between the terrain point and the location point, the gradual elevation is determined, including: The distance between the terrain point and the location point is determined based on the pixel distance between the terrain point and the location point and the actual distance represented by the pixels in the raster image; Get the road width of the road where the location point is located; The gradual elevation is obtained by multiplying the difference between the distance between the terrain point and the location point and half the road width by the tangent of the preset angle.
9. The method according to claim 8, wherein, The value of the preset angle is related to the type of road where the location point is located.
10. A terrain data elevation adjustment device, wherein, include: The initial elevation acquisition module is used to acquire the initial elevation of terrain points recorded in the terrain data; The road network data acquisition module is used to acquire road network data of the geographical area covered by the terrain data from a pre-generated high-precision map. The road network data records the elevation of the location points of the roads. The elevation adjustment module is used to adjust the initial elevation of terrain points located around the location points in the terrain data based on the elevation of the location points recorded in the road network data.
11. An electronic device, wherein, include: At least one processor, and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor; The instructions are executed by the at least one processor to implement the method as described in any one of claims 1-9.
12. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-9.
13. A computer program product, wherein, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Original terrain correction method and system based on a BIM model, and computer terminal
CN113763289A
Method for making three-dimensional topographic map in waterlogging mathematical model
CN114663609A
Contour drawing method of ground element, electronic equipment and computer program product
CN114723900A
Map data adjustments for anomaly correction
US20220390255A1