Terrain elevation value processing method and device, electronic equipment and storage medium

By dividing the coordinate grid within the geographical space area and performing smoothing processing, the problem of low accuracy of terrain elevation data is solved and the efficiency and accuracy of high-precision map production are improved.

CN118730035APending Publication Date: 2024-10-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310341902.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When obtaining terrain elevation data with the existing technology, the data accuracy is not high. Especially in the process of high-precision map production, due to uneven data distribution, the acquisition of terrain elevation data takes a long time and requires a lot of manpower and material resources.

Method used

By obtaining the elevation data of multiple sampling points in the geographical space area, dividing it into multiple coordinate grids, and based on the positions and elevation values ​​of these grids, the target grid is selected for smoothing processing, and the elevation values ​​of the sampling locations are updated. Improve data accuracy.

Benefits of technology

It improves the accuracy of terrain elevation data, reduces the time and human and material investment in obtaining high-precision data, and achieves more efficient high-precision map production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118730035A_ABST
    Figure CN118730035A_ABST
Patent Text Reader

Abstract

The invention relates to a terrain elevation value processing method and device, electronic equipment and a storage medium, and is applied to the technical field of data processing, the method comprises the following steps: acquiring elevation data of a plurality of sampling points in a geographic space region, each sampling point elevation data comprising a sampling position coordinate and a sampling elevation value of the sampling position coordinate; dividing the geographic space area into a plurality of coordinate grids, and obtaining the elevation value of each coordinate grid based on the sampling elevation values of the sampling position coordinates; selecting N target coordinate grids based on the position coordinates of each coordinate grid and the elevation values of the coordinate grids; smoothing the elevation values of the coordinate grids according to the elevation values of the N target coordinate grids to obtain smoothed elevation values of the coordinate grids; and updating the elevation values of the plurality of sampling position coordinates according to the smoothed elevation values of the plurality of coordinate grids to obtain the updated elevation values of the plurality of sampling position coordinates. The precision of the terrain elevation data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a terrain elevation value processing method, device, electronic device and storage medium. Background Art

[0002] Terrain elevation refers to the distance from a point to the absolute base surface along the plumb line. In related technologies, the process of obtaining terrain elevation data is that terrain surveyors use professional instruments to observe the terrain and use the observed values ​​to obtain terrain elevation data. This method consumes a long time and requires a lot of manpower and material resources. Especially in the process of making high-precision maps, due to the large amount of terrain elevation data that needs to be measured, when terrain elevation data is missing, it is impossible to complete the production of high-precision maps in a short time. In addition, some people have proposed to use existing data (such as elevation values ​​in vehicle driving data) to obtain terrain elevation data. Although it reduces the time to obtain elevation data, the data distribution in the existing data may not be ideal. For example, the elevation values ​​in vehicle driving data are concentrated on the road, which may not be evenly distributed in an area, which results in the low accuracy of the terrain elevation data obtained. Therefore, how to use existing data to obtain high-precision terrain elevation data has become an urgent problem to be solved. Summary of the invention

[0003] In order to solve the above technical problems, the present application provides a terrain elevation value processing method, device, electronic device and storage medium.

[0004] According to a first aspect of the present application, a method for processing terrain elevation values ​​is provided, comprising:

[0005] Acquire multiple sampling point elevation data in the geographic space region of the terrain elevation to be smoothed, each of the sampling point elevation data includes: sampling position coordinates and sampling elevation values ​​of the sampling position coordinates;

[0006] Dividing the geographic space area into a plurality of coordinate grids, and obtaining the elevation value of each coordinate grid based on the sampling elevation value of the sampling position coordinates;

[0007] For a single coordinate grid, based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, select N target coordinate grids from the multiple coordinate grids, where N is a positive integer;

[0008] Smoothing the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid;

[0009] The elevation values ​​of the plurality of sampling position coordinates are updated according to the smoothed elevation values ​​of the plurality of coordinate grids to obtain updated elevation values ​​of the plurality of sampling position coordinates.

[0010] Optionally, the selecting N target coordinate grids from the multiple coordinate grids based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid includes:

[0011] Selecting a first candidate coordinate grid from the plurality of coordinate grids in ascending order of distance from the coordinate grid;

[0012] Determine whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than a preset difference;

[0013] If the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, determining the candidate coordinate grid as the target coordinate grid;

[0014] If the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is greater than or equal to the preset difference, select the next candidate coordinate grid from the multiple coordinate grids in ascending order of distance from the coordinate grid, and return to the step of determining whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, until the number of target coordinate grids reaches N.

[0015] Optionally, updating the elevation values ​​of the plurality of sampling position coordinates according to the smoothed elevation values ​​of the plurality of coordinate grids to obtain the updated elevation values ​​of the plurality of sampling position coordinates includes:

[0016] For a single sampling position coordinate, updating the elevation value of the sampling position coordinate from the sampling elevation value to the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs; or,

[0017] For a single sampling position coordinate, a weighted average is performed on the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs and the smoothed elevation values ​​of the adjacent grids of the coordinate grid to which the sampling position coordinate belongs, to obtain a weighted average elevation value;

[0018] The elevation value of the sampling position coordinate is updated from the sampling elevation value to the weighted average elevation value.

[0019] Optionally, the step of smoothing the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid includes:

[0020] Determine the average of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid as the smoothed elevation value of the coordinate grid; or

[0021] A weighted average of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid is determined as the smoothed elevation value of the coordinate grid.

[0022] Optionally, obtaining the elevation value of each coordinate grid based on the sampling elevation value of the sampling position coordinates includes:

[0023] For a single coordinate grid, if the coordinate grid contains sampling position coordinates, the average value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid is determined as the elevation value of the coordinate grid; or,

[0024] Determine the maximum value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid as the elevation value of the coordinate grid;

[0025] If the coordinate grid does not contain the sampling position coordinates, obtain the M sampling position coordinates closest to the coordinate grid, and determine the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates, where M is a positive integer.

[0026] Optionally, determining the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates includes:

[0027] Determine the average of the sampled elevation values ​​of the M sampling position coordinates as the elevation value of the coordinate grid; or,

[0028] The weighted average of the sampling elevation values ​​of the M sampling position coordinates is determined as the elevation value of the coordinate grid.

[0029] Optionally, dividing the geographic space area into a plurality of coordinate grids comprises:

[0030] Obtain the maximum latitude, minimum latitude, maximum longitude and minimum longitude of the geographic space area;

[0031] The geographic space area is divided into a plurality of rectangular areas according to the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude.

[0032] According to a second aspect of the present application, a terrain elevation value processing device is provided, comprising:

[0033] A sampling point elevation data acquisition module is used to acquire a plurality of sampling point elevation data in a geographic space region of the terrain elevation to be smoothed, each of the sampling point elevation data comprising: sampling position coordinates and sampling elevation values ​​of the sampling position coordinates;

[0034] A geographic space region division module, used for dividing the geographic space region into a plurality of coordinate grids;

[0035] A coordinate grid elevation value determination module, used to obtain the elevation value of each coordinate grid based on the sampling elevation value of the sampling position coordinates;

[0036] A target coordinate grid selection module is used to select N target coordinate grids from the multiple coordinate grids based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, wherein N is a positive integer;

[0037] A coordinate grid elevation value smoothing processing module, used for smoothing the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid;

[0038] The sampling position coordinate elevation value updating module is used to update the elevation values ​​of the plurality of sampling position coordinates according to the smoothed elevation values ​​of the plurality of coordinate grids to obtain updated elevation values ​​of the plurality of sampling position coordinates.

[0039] Optionally, the target coordinate grid selection module is specifically used to select a first candidate coordinate grid from the multiple coordinate grids in order of distance from the coordinate grid from small to large; determine whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than a preset difference; if the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, determine the candidate coordinate grid as the target coordinate grid; if the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is greater than or equal to the preset difference, select the next candidate coordinate grid from the multiple coordinate grids in order of distance from the coordinate grid from small to large, and return to the step of determining whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, until the number of target coordinate grids reaches N.

[0040] Optionally, the sampling position coordinate elevation value updating module is specifically used to update the elevation value of the sampling position coordinate from the sampling elevation value to the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs, for a single sampling position coordinate; or

[0041] For a single sampling position coordinate, a weighted average is performed on the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs and the smoothed elevation values ​​of adjacent grids of the coordinate grid to which the sampling position coordinate belongs to obtain a weighted average elevation value; and the elevation value of the sampling position coordinate is updated from the sampling elevation value to the weighted average elevation value.

[0042] Optionally, the coordinate grid elevation value smoothing processing module is specifically used to determine the average value of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid as the smoothed elevation value of the coordinate grid; or to determine the weighted average value of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid as the smoothed elevation value of the coordinate grid.

[0043] Optionally, the coordinate grid elevation value determination module is specifically used to, for a single coordinate grid, if the coordinate grid contains sampling position coordinates, determine the average value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid as the elevation value of the coordinate grid; or determine the maximum value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid as the elevation value of the coordinate grid;

[0044] If the coordinate grid does not contain the sampling position coordinates, obtain the M sampling position coordinates closest to the coordinate grid, and determine the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates, where M is a positive integer.

[0045] Optionally, the coordinate grid elevation value determination module is specifically used to determine the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates in the following manner:

[0046] Determine the average of the sampled elevation values ​​of the M sampling position coordinates as the elevation value of the coordinate grid; or,

[0047] The weighted average of the sampling elevation values ​​of the M sampling position coordinates is determined as the elevation value of the coordinate grid.

[0048] Optionally, the geographic space area division module is used to obtain the maximum latitude, minimum latitude, maximum longitude and minimum longitude of the geographic space area; and divide the geographic space area into multiple rectangular areas according to the maximum latitude, minimum latitude, maximum longitude and minimum longitude.

[0049] According to a third aspect of the present application, an electronic device is provided, comprising: a processor, wherein the processor is configured to execute a computer program stored in a memory, wherein the computer program implements the method described in the first aspect when executed by the processor.

[0050] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect is implemented.

[0051] According to a fifth aspect of the present application, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect.

[0052] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:

[0053] After obtaining the elevation data of multiple sampling points in the geographic space area of ​​the terrain elevation to be smoothed, each sampling point elevation data includes: sampling position coordinates and sampling elevation values ​​of the sampling position coordinates. Since the sampling elevation values ​​of the sampling position coordinates are obtained by collecting equipment, there may be errors. Therefore, the sampling elevation values ​​of the sampling position coordinates can be smoothed. The geographic space area is divided into multiple coordinate grids, and the coordinate grids can contain sampling position coordinates. In this way, based on the sampling elevation values ​​of the sampling position coordinates, the elevation value of each coordinate grid can be obtained. For a single coordinate grid, based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, N target coordinate grids are selected from multiple coordinate grids, N is a positive integer, and the elevation value of the coordinate grid is smoothed according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid. That is, according to the spatial position relationship and the elevation value size relationship between the coordinate grids, the elevation value of the coordinate grid is smoothed using the N target coordinate grids. Then, according to the smoothed elevation values ​​of the multiple coordinate grids, the elevation values ​​of the multiple sampling position coordinates are updated to obtain the updated elevation values ​​of the multiple sampling position coordinates. For example, the elevation value of the coordinate grid to which the sampling position coordinate belongs can be used as the elevation value of the sampling position coordinate. It can be seen that the present application realizes smoothing of the elevation value of the sampling position coordinate by smoothing the elevation value of the coordinate grid, thereby improving the accuracy of the elevation value of the sampling position coordinate. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0056] Figure 1A schematic diagram showing a system architecture of an exemplary application environment of the terrain elevation value processing method that can be applied to the embodiment of the present application;

[0057] Figure 2 A flow chart of a method for processing terrain elevation values ​​in an embodiment of the present application;

[0058] Figure 3 A flow chart for selecting a target coordinate grid in an embodiment of the present application;

[0059] Figure 4 A schematic diagram of the structure of a terrain elevation value processing device in an embodiment of the present application;

[0060] Figure 5 A schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0061] 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.

[0062] 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.

[0063] Figure 1 A schematic diagram of a system architecture of an exemplary application environment that can be applied to the terrain elevation value processing method of the embodiment of the present application is shown.

[0064] like Figure 1 As shown, the system architecture 100 may include a GPS device 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the GPS device 101 and the server 103. It should be understood that Figure 1 The number of GPS devices 101, networks and servers in the embodiment is only for illustration. Any number of GPS devices, networks and servers may be provided as required. For example, server 103 may be a server cluster composed of multiple servers.

[0065] The terrain elevation value processing method provided in the embodiment of the present application is generally executed by the server 103, and accordingly, the terrain elevation value processing device can be set in the server 103. For example, the server 103 can obtain the elevation data of multiple sampling points in the geographic space area of ​​the terrain elevation to be smoothed from the GPS device 101. The geographic space area is divided into multiple coordinate grids, and the elevation value of each coordinate grid is obtained based on the sampling elevation value of the sampling position coordinate. For a single coordinate grid, based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, N target coordinate grids are selected from multiple coordinate grids, where N is a positive integer; the elevation value of the coordinate grid is smoothed according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid; according to the smoothed elevation values ​​of the multiple coordinate grids, the elevation values ​​of the multiple sampling position coordinates are updated to obtain the updated elevation values ​​of the multiple sampling position coordinates. It can be seen that the embodiment of the present application maps the elevation value of the sampling position coordinate to the coordinate grid, and obtains the elevation value of the coordinate grid based on the sampling elevation value of the sampling position coordinate. By smoothing the elevation values ​​of the coordinate grid, and then updating the elevation values ​​of the sampling position coordinates by the smoothed elevation values ​​of the coordinate grid, the elevation values ​​of the sampling position coordinates are smoothed to improve the accuracy of the elevation values ​​of each sampling position coordinate.

[0066] The following first introduces in detail the terrain elevation value processing method of the embodiment of the present application.

[0067] See also Figure 2 , Figure 2 A flowchart of a method for processing terrain elevation values ​​in an embodiment of the present application may include the following steps:

[0068] Step S210, obtaining elevation data of a plurality of sampling points in a geographic space region of the terrain elevation to be smoothed.

[0069] The geographic space region of the terrain elevation to be smoothed may be a pre-set space region. The space region may include multiple sampling points, and the elevation value of each sampling point may be collected by a GPS device, thereby obtaining the sampling point elevation data corresponding to each sampling point. Among them, each sampling point elevation data includes: sampling position coordinates and sampling elevation values ​​of the sampling position coordinates. The sampling position coordinates are the position coordinates of the sampling point, and the sampling elevation values ​​of the sampling position coordinates are the elevation values ​​collected at the sampling position coordinates.

[0070] Step S220, dividing the geographic space area into a plurality of coordinate grids, and obtaining the elevation value of each coordinate grid based on the sampled elevation value of the sampling position coordinates.

[0071] In an embodiment of the present application, the geographic space area can be divided into granularity to obtain multiple coordinate grids, each coordinate grid corresponding to an elevation value. The present application does not specifically limit the shape of the coordinate grid, for example, it can be a square, a rectangle, a triangle, etc. In some embodiments, the maximum latitude, minimum latitude, maximum longitude and minimum longitude of the geographic space area can be obtained, and the geographic space area can be divided into multiple rectangular areas according to the maximum latitude, minimum latitude, maximum longitude and minimum longitude.

[0072] For example, the minimum longitude is l1, the maximum longitude is l2, the minimum latitude is a1, and the maximum latitude is a2. Based on these four values, a quadrilateral is obtained, and the quadrilateral is divided equally to obtain s*d rectangular planes. It should be noted that the coordinate grid of the boundary area can be supplemented or deleted so that the final coordinate grid is a rectangle.

[0073] It is understandable that the larger the values ​​of s and d, the larger the granularity of the coordinate grid, and the higher the accuracy of the terrain elevation data finally obtained. However, the amount of calculation in the terrain elevation value processing process is also greater. The application can set reasonable values ​​for s and d according to actual needs.

[0074] In some embodiments, for a single coordinate grid, the coordinate grid may or may not contain sampling position coordinates. In the case of containing sampling position coordinates, it may contain one sampling position coordinate or multiple sampling position coordinates. If the coordinate grid contains sampling position coordinates, the average value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid can be determined as the elevation value of the coordinate grid. It is understandable that if the coordinate grid contains a sampling position coordinate, then the elevation value of the sampling position coordinate is the elevation value of the coordinate grid. Alternatively, the maximum value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid can also be determined as the elevation value of the coordinate grid.

[0075] If the coordinate grid does not contain the sampling position coordinates, the M sampling position coordinates closest to the coordinate grid can be obtained, and the elevation value of the coordinate grid can be determined according to the sampling elevation values ​​of the M sampling position coordinates, where M is a positive integer, for example, M can be 5, 6, 8, etc. In an optional embodiment, the average value of the sampling elevation values ​​of the M sampling position coordinates can be directly determined as the elevation value of the coordinate grid. Alternatively, considering that the distances between each sampling position coordinate and the coordinate grid are different, a weight can be set according to the distance between the sampling position coordinate and the coordinate grid. The closer the distance between the sampling position coordinate and the coordinate grid, the greater the corresponding weight. Then, the sampling elevation values ​​of the M sampling position coordinates are weighted averaged, and the weighted average value of the sampling elevation values ​​of the M sampling position coordinates is determined as the elevation value of the coordinate grid.

[0076] In an optional implementation, if the coordinate grid does not contain the sampling position coordinates, the elevation value of the coordinate grid can also be determined based on the elevation values ​​of the adjacent coordinate grids. For example, the P coordinate grids closest to the coordinate grid are obtained, and the elevation value of the coordinate grid is determined based on the elevation values ​​of the P coordinate grids. For example, the average of the elevation values ​​of the P coordinate grids is directly determined as the elevation value of the coordinate grid, or the elevation values ​​of the P coordinate grids are weighted averaged, and the obtained weighted average is determined as the elevation value of the coordinate grid.

[0077] Step S230 , for a single coordinate grid, based on the position coordinates of the coordinate grid and the elevation values ​​of the coordinate grid, select N target coordinate grids from multiple coordinate grids, where N is a positive integer.

[0078] In the embodiment of the present application, the elevation value of the coordinate grid can be smoothed to achieve smoothing of the elevation value of the sampling position coordinate. Since the elevation value of any coordinate grid is usually related to the elevation value of the adjacent coordinate grid of the coordinate grid, and the elevation value of the coordinate grid and the elevation value of the adjacent coordinate grid do not fluctuate greatly, the target coordinate grid can be selected based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid. For example, the target coordinate grid can be a coordinate grid that is adjacent to the coordinate grid and has a close elevation value to the coordinate grid.

[0079] See also Figure 3 , Figure 3 A flow chart for selecting a target coordinate grid in an embodiment of the present application may include the following steps:

[0080] Step S310 , selecting a first candidate coordinate grid from a plurality of coordinate grids in ascending order of distance from the coordinate grid.

[0081] The first candidate coordinate grid is the coordinate grid closest to the coordinate grid.

[0082] Step S320, determining whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than a preset difference.

[0083] If the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, it means that the elevation value of the candidate coordinate grid fluctuates slightly, and step S330 can be executed, that is, the candidate coordinate grid is directly selected. If the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is greater than or equal to the preset difference, it means that the elevation value of the candidate coordinate grid fluctuates greatly, and the candidate coordinate grid is not selected, and step S350 is executed.

[0084] Step S330: determining the candidate coordinate grid as the target coordinate grid.

[0085] Step S340, determining whether the number of target coordinate grids reaches N.

[0086] If the number of target coordinate grids reaches N, it means that N target coordinate grids have been selected, the process ends, and the subsequent steps are performed. If the number of target coordinate grids does not reach N, step 350 is performed to select the next candidate coordinate grid.

[0087] Step 350 , selecting the next candidate coordinate grid from the multiple coordinate grids in ascending order of distance from the coordinate grid, and returning to step S320 .

[0088] According to the above method, the selected N target coordinate grids are close to the coordinate grid, and the difference between the elevation values ​​of the N target coordinate grids and the coordinate grid is small.

[0089] Step S240 , smoothing the elevation values ​​of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain smoothed elevation values ​​of the coordinate grid.

[0090] After selecting N target coordinate grids, the elevation value of the coordinate grid can be smoothed according to the elevation values ​​of the N target coordinate grids. For example, the elevation value of the coordinate grid can be determined according to the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid. In some embodiments, the average value of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid can be determined as the smoothed elevation value of the coordinate grid. Alternatively, the weighted average value of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid can be determined as the smoothed elevation value of the coordinate grid.

[0091] It should be noted that the method for selecting the target coordinate grid is not limited to this. For example, R candidate coordinate grids closest to the coordinate grid may be directly selected, where R is greater than N. Then, the candidate coordinate grids corresponding to the elevation values ​​with large fluctuations among the R candidate coordinate grids are directly deleted to obtain N target coordinate grids.

[0092] Step S250 , updating the elevation values ​​of the plurality of sampling position coordinates according to the smoothed elevation values ​​of the plurality of coordinate grids, to obtain updated elevation values ​​of the plurality of sampling position coordinates.

[0093] After smoothing the elevation value of the coordinate grid, the elevation value of the sampling position coordinate can be updated based on the smoothed elevation value of the coordinate grid, thereby achieving smoothing of the elevation value of the sampling position coordinate. In an optional implementation, for a single sampling position coordinate, the elevation value of the sampling position coordinate is updated from the sampling elevation value to the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs. Alternatively, for a single sampling position coordinate, the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs and the smoothed elevation values ​​of the adjacent grids of the coordinate grid to which the sampling position coordinate belongs are weighted averaged to obtain a weighted average elevation value, and the elevation value of the sampling position coordinate is updated from the sampling elevation value to the weighted average elevation value.

[0094] The terrain elevation value processing method of the embodiment of the present application can obtain the elevation data of multiple sampling points in the geographic space area of ​​the terrain elevation to be smoothed, and the geographic space area can be divided into multiple coordinate grids. Based on the sampling elevation value of the sampling position coordinates, the elevation value of each coordinate grid can be obtained. For a single coordinate grid, based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, N target coordinate grids are selected from multiple coordinate grids, N is a positive integer, and the elevation value of the coordinate grid is smoothed according to the elevation value of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid. That is, according to the spatial position relationship between the coordinate grids and the elevation value size relationship, the elevation value of the coordinate grid is smoothed using the N target coordinate grids. Then, according to the smoothed elevation values ​​of the multiple coordinate grids, the elevation values ​​of the multiple sampling position coordinates are updated to obtain the updated elevation values ​​of the multiple sampling position coordinates. For example, the elevation value of the coordinate grid to which the sampling position coordinate belongs can be used as the elevation value of the sampling position coordinate. It can be seen that the present application realizes smoothing of the elevation values ​​of the sampling position coordinates by smoothing the elevation values ​​of the coordinate grid, thereby improving the accuracy of the elevation values ​​of the sampling position coordinates.

[0095] Corresponding to the above method embodiment, the present application embodiment also provides a terrain elevation value processing device, see Figure 4 , the terrain elevation value processing device 400 includes:

[0096] The sampling point elevation data acquisition module 410 is used to acquire elevation data of multiple sampling points in the geographic space region of the terrain elevation to be smoothed, and each sampling point elevation data includes: sampling position coordinates and sampling elevation values ​​of the sampling position coordinates;

[0097] A geospatial region division module 420, for dividing the geospatial region into a plurality of coordinate grids;

[0098] A coordinate grid elevation value determination module 430 is used to obtain the elevation value of each coordinate grid based on the sampled elevation value of the sampling position coordinates;

[0099] The target coordinate grid selection module 440 is used to select N target coordinate grids from multiple coordinate grids based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, where N is a positive integer;

[0100] A coordinate grid elevation value smoothing processing module 450 is used to smooth the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid;

[0101] The sampling position coordinate elevation value updating module 460 is used to update the elevation values ​​of the multiple sampling position coordinates according to the smoothed elevation values ​​of the multiple coordinate grids to obtain updated elevation values ​​of the multiple sampling position coordinates.

[0102] Optionally, the target coordinate grid selection module 440 is specifically used to select the first candidate coordinate grid from multiple coordinate grids in order of distance from the coordinate grid from small to large; determine whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than a preset difference; if the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, determine the candidate coordinate grid as the target coordinate grid; if the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is greater than or equal to the preset difference, select the next candidate coordinate grid from multiple coordinate grids in order of distance from the coordinate grid from small to large, and return to the step of determining whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, until the number of target coordinate grids reaches N.

[0103] Optionally, the sampling position coordinate elevation value updating module 460 is specifically used to update the elevation value of the sampling position coordinate from the sampling elevation value to the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs, for a single sampling position coordinate; or

[0104] For a single sampling location coordinate, a weighted average is performed on the smoothed elevation value of the coordinate grid to which the sampling location coordinate belongs and the smoothed elevation value of the adjacent grids of the coordinate grid to which the sampling location coordinate belongs to obtain a weighted average elevation value; and the elevation value of the sampling location coordinate is updated from the sampling elevation value to the weighted average elevation value.

[0105] Optionally, the coordinate grid elevation value smoothing processing module 450 is specifically used to determine the average of the elevation values ​​of N target coordinate grids and the elevation values ​​of the coordinate grid as the smoothed elevation value of the coordinate grid; or to determine the weighted average of the elevation values ​​of N target coordinate grids and the elevation value of the coordinate grid as the smoothed elevation value of the coordinate grid.

[0106] Optionally, the coordinate grid elevation value determination module 430 is specifically configured to, for a single coordinate grid, determine the average value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid as the elevation value of the coordinate grid if the coordinate grid contains sampling position coordinates; or determine the maximum value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid as the elevation value of the coordinate grid;

[0107] If the coordinate grid does not contain the sampling position coordinates, obtain the M sampling position coordinates closest to the coordinate grid, and determine the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates, where M is a positive integer.

[0108] Optionally, the coordinate grid elevation value determination module 430 is specifically configured to determine the elevation value of the coordinate grid according to the sampled elevation values ​​of the M sampling position coordinates in the following manner:

[0109] The average of the sampled elevation values ​​of the M sampling position coordinates is determined as the elevation value of the coordinate grid; or,

[0110] The weighted average of the sampled elevation values ​​of the M sampling position coordinates is determined as the elevation value of the coordinate grid.

[0111] Optionally, a geographic space area division module is used to obtain the maximum latitude, minimum latitude, maximum longitude and minimum longitude of the geographic space area; and divide the geographic space area into multiple rectangular areas according to the maximum latitude, minimum latitude, maximum longitude and minimum longitude.

[0112] The specific details of each module or unit in the above device have been described in detail in the corresponding method, so they will not be repeated here.

[0113] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0114] In an exemplary embodiment of the present application, an electronic device is also provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the terrain elevation value processing method described above in this exemplary embodiment.

[0115] Figure 5 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. It should be noted that: Figure 5The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0116] like Figure 5 As shown, electronic device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In RAM 503, various programs and data required for system operation are also stored. Central processing unit 501, ROM 502 and RAM 503 are connected to each other via a bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0117] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network (LAN) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0118] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 509, and / or installed from a removable medium 511. When the computer program is executed by the central processing unit 501, various functions defined in the device of the present application are executed.

[0119] In an embodiment of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned terrain elevation value processing method is implemented.

[0120] It should be noted that the computer-readable storage medium shown in the present application may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency, etc., or any suitable combination of the above.

[0121] In an embodiment of the present application, a computer program product is also provided. When the computer program product is run on a computer, the computer executes the above-mentioned terrain elevation value processing method.

[0122] 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 terms "include", "comprise" or any other variants thereof are 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.

[0123] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing terrain elevation values, characterized in that: The method comprises: Acquire multiple sampling point elevation data in the geographic space region of the terrain elevation to be smoothed, each of the sampling point elevation data includes: sampling position coordinates and sampling elevation values ​​of the sampling position coordinates; Dividing the geographic space area into a plurality of coordinate grids, and obtaining the elevation value of each coordinate grid based on the sampling elevation value of the sampling position coordinates; For a single coordinate grid, based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, select N target coordinate grids from the multiple coordinate grids, where N is a positive integer; Smoothing the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid; The elevation values ​​of the plurality of sampling position coordinates are updated according to the smoothed elevation values ​​of the plurality of coordinate grids to obtain updated elevation values ​​of the plurality of sampling position coordinates.

2. The method according to claim 1, characterized in that The selecting N target coordinate grids from the plurality of coordinate grids based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid comprises: Selecting a first candidate coordinate grid from the plurality of coordinate grids in ascending order of distance from the coordinate grid; Determine whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than a preset difference; If the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, determining the candidate coordinate grid as the target coordinate grid; If the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is greater than or equal to the preset difference, select the next candidate coordinate grid from the multiple coordinate grids in ascending order of distance from the coordinate grid, and return to the step of determining whether the difference between the elevation value of the candidate coordinate grid and the elevation value of the coordinate grid is less than the preset difference, until the number of target coordinate grids reaches N.

3. The method according to claim 1, characterized in that The step of updating the elevation values ​​of the plurality of sampling position coordinates according to the smoothed elevation values ​​of the plurality of coordinate grids to obtain the updated elevation values ​​of the plurality of sampling position coordinates comprises: For a single sampling position coordinate, updating the elevation value of the sampling position coordinate from the sampling elevation value to the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs; or, For a single sampling position coordinate, a weighted average is performed on the smoothed elevation value of the coordinate grid to which the sampling position coordinate belongs and the smoothed elevation values ​​of the adjacent grids of the coordinate grid to which the sampling position coordinate belongs, to obtain a weighted average elevation value; The elevation value of the sampling position coordinate is updated from the sampling elevation value to the weighted average elevation value.

4. The method according to claim 1, characterized in that The step of smoothing the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid includes: Determine the average of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid as the smoothed elevation value of the coordinate grid; or A weighted average of the elevation values ​​of the N target coordinate grids and the elevation value of the coordinate grid is determined as the smoothed elevation value of the coordinate grid.

5. The method according to claim 1, characterized in that The step of obtaining the elevation value of each coordinate grid based on the sampling elevation value of the sampling position coordinates includes: For a single coordinate grid, if the coordinate grid contains sampling position coordinates, the average of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid is determined as the elevation value of the coordinate grid; or, Determine the maximum value of the sampling elevation values ​​of the sampling position coordinates contained in the coordinate grid as the elevation value of the coordinate grid; If the coordinate grid does not contain the sampling position coordinates, obtain the M sampling position coordinates closest to the coordinate grid, and determine the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates, where M is a positive integer.

6. The method according to claim 5, characterized in that Determining the elevation value of the coordinate grid according to the sampling elevation values ​​of the M sampling position coordinates includes: Determine the average of the sampled elevation values ​​of the M sampling position coordinates as the elevation value of the coordinate grid; or, The weighted average of the sampling elevation values ​​of the M sampling position coordinates is determined as the elevation value of the coordinate grid.

7. The method according to claim 1, characterized in that The step of dividing the geographic space area into a plurality of coordinate grids comprises: Obtain the maximum latitude, minimum latitude, maximum longitude and minimum longitude of the geographic space area; The geographic space area is divided into a plurality of rectangular areas according to the maximum latitude, the minimum latitude, the maximum longitude and the minimum longitude.

8. A terrain elevation value processing device, characterized in that: The device comprises: A sampling point elevation data acquisition module is used to acquire a plurality of sampling point elevation data in a geographic space region of a terrain elevation to be smoothed, wherein each of the sampling point elevation data includes: sampling position coordinates and a sampling elevation value of the sampling position coordinates; A coordinate grid elevation value determination module, used for dividing the geographic space area into a plurality of coordinate grids, and obtaining the elevation value of each coordinate grid based on the sampling elevation value of the sampling position coordinates; A target coordinate grid selection module is used to select N target coordinate grids from the multiple coordinate grids based on the position coordinates of the coordinate grid and the elevation value of the coordinate grid, wherein N is a positive integer; A coordinate grid elevation value smoothing processing module, used for smoothing the elevation value of the coordinate grid according to the elevation values ​​of the N target coordinate grids to obtain the smoothed elevation value of the coordinate grid; The sampling position coordinate elevation value updating module is used to update the elevation values ​​of the plurality of sampling position coordinates according to the smoothed elevation values ​​of the plurality of coordinate grids to obtain updated elevation values ​​of the plurality of sampling position coordinates.

9. An electronic device, characterized in that: include: A processor, wherein the processor is used to execute a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the terrain elevation value processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the terrain elevation value processing method described in any one of claims 1 to 7 is implemented.