Urban range topographic data processing method and system, storage medium and equipment
By constructing urban space masks and topographic segmentation grids and analyzing the elevation cutoff point values, the distortion problem caused by undulations in urban three-dimensional space is solved, the smooth processing of terrain data is achieved, and the visual effect and application performance are improved.
Patent Information
- Application Number
- CN202411328381.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-31
AI Technical Summary
In the three-dimensional space of the city, the large undulation of the terrain causes distortion of buildings and linear land objects such as traffic lines and rivers and surface unevenness, affecting the visual effect.
By obtaining the spatial elements and original terrain data of the target city, building a urban spatial range mask, cropping the terrain data, generating a terrain segmentation grid, analyzing the elevation distribution and determining the elevation boundary point value, filtering the cell value to generate multi-resolution surface data, And embed it into the original terrain data to eliminate terrain fluctuations and fluctuations.
It realizes smooth processing of terrain data within the city, eliminates the distortion problem caused by terrain fluctuations, and improves the visual effect in three-dimensional visualization applications, especially the best display of factors such as buildings, transportation lines, facilities, and water bodies.
Smart Images

Figure CN119229047A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural data processing, and in particular to a method, system, storage medium and device for processing urban terrain data. Background Art
[0002] With the development of smart city platforms, urban landscape models, and digital twins, geographic information systems and related visualization applications in urban three-dimensional scenes with cities as the main body have become increasingly prominent and important. Promoting the construction of three-dimensional real scenes has important strategic and practical significance, and we should increase the display of fine-grained three-dimensional entities in urban space, including buildings, transportation, land use, and natural covers such as terrain, vegetation, and water bodies.
[0003] Terrain data is the spatial base for displaying urban elements, and the terrain data is mainly expressed in DE graphics M (Di Terrain Grid Gital Elevation Graphic Model). The spatial resolution of DE graphics M affects the granularity and details of the three-dimensional terrain effect. However, due to some reasons such as the large undulations of the actual terrain and the exaggerated undulations caused by DE graphics M sampling, directly loading urban spatial elements with the original DE graphics M as the spatial base will have the following problems:
[0004] In the display of 3D buildings, it is necessary to determine the normal of the terrain where the building is located. The uneven terrain will cause distortion in the distribution of buildings. For the display of continuous coverings, especially linear elements such as rivers and traffic lines, the original terrain will appear uneven, distorted and crooked. The application of urban three-dimensional space focuses on displaying human elements such as buildings, facilities, traffic lines, bridges, etc. The terrain elements can be adjusted within a suitable range to display the above elements with the best visual effect. Therefore, how to process the terrain data in a certain way is a technical problem that technicians in the field of three-dimensional urban space scene data preprocessing need to solve urgently. Summary of the invention
[0005] The purpose of this application is to provide a method, system, computer storage medium and electronic device for processing urban terrain data, which can eliminate terrain fluctuations within the city and effectively solve the problem of distortion of linear features such as traffic lines and rivers caused by terrain fluctuations.
[0006] In order to solve the above technical problems, this application provides a method for processing urban terrain data. The specific technical solution is as follows:
[0007] Acquire a target city spatial element and an original terrain data set, and extract all nodes in the target city spatial element to form a node set;
[0008] constructing a city space range mask based on the node set;
[0009] Clipping the original terrain data set with the urban space range mask to obtain target terrain data;
[0010] Generate a terrain subdivision grid according to the target terrain data;
[0011] Analyze the elevation distribution of each dividing line in the terrain dividing grid to determine the elevation dividing point value;
[0012] Filtering pixel values in the target terrain data using the elevation cutoff point value to obtain multi-resolution surface data;
[0013] The multi-resolution surface data is mosaicked into the original terrain data set to obtain city-wide terrain data.
[0014] Optionally, extracting all nodes in the target city spatial element to form a node set includes:
[0015] Determine all nodes in the target city spatial elements; the nodes include building outlines, facility outlines, road networks and water bodies;
[0016] Generate a point-distributed node set according to the node set graph.
[0017] Optionally, constructing the urban space range mask according to the node set includes:
[0018] Construct a convex hull according to the node set to generate an original spatial range;
[0019] Within the original space range, a buffer zone is constructed for the convex hull with a preset distance as a buffer radius to obtain a graph, and the graph is used as a mask of the urban space range.
[0020] Optionally, also include:
[0021] The preset distance is determined according to the reciprocal of the maximum value of the spatial distance between any two nodes in the node set.
[0022] Optionally, generating a terrain subdivision grid according to the target terrain data includes:
[0023] Calculate the circumscribed rectangular frame of the convex hull;
[0024] Calculating the horizontal distance and the vertical distance of the circumscribed rectangular frame, and the minimum value of the horizontal distance and the vertical distance; the minimum value is used to calculate the set spacing;
[0025] Taking the upper left corner of the circumscribed rectangular frame as the starting point, generating a grid for the circumscribed rectangular frame with the set spacing;
[0026] The grid lines of the grid are used as a terrain subdivision grid; wherein the grid lines do not include the boundaries of the outer rectangular frame.
[0027] Optionally, analyzing the elevation distribution of each dividing line in the terrain dividing grid to determine the elevation dividing point value includes:
[0028] Analyze the elevation distribution of each subdivision line in the subdivision grid to determine the convex hull of the elevation boundary value;
[0029] For each grid line terrain subdivision grid in the terrain subdivision grid, taking any endpoint as a starting point, subdividing the target terrain data;
[0030] The elevations divided by the terrain division grid of each division line are sorted in reverse order to obtain a set, and a scatter plot is drawn according to the set;
[0031] The turning point between the higher elevation and the lower elevation in the scatter plot is used as a dividing point;
[0032] Determine the elevation filter value on the grid line according to the demarcation point;
[0033] Draw an elevation difference scatter plot with elevation as the horizontal axis and elevation difference as the vertical axis, and determine the convex hull of the elevation value of the dividing point based on the elevation difference scatter plot;
[0034] The average value of the convex hull of the elevation value determined by each grid line in the terrain subdivision grid is used as the elevation dividing point value of the target terrain data.
[0035] Optionally, mosaicking the multi-resolution surface data into the original terrain data set to obtain city-wide terrain data includes:
[0036] City-wide terrain data is generated based on the original terrain dataset and based on the multi-resolution surface data.
[0037] The present application also provides a city-wide terrain data processing system, comprising:
[0038] An extraction module is used to obtain the target city spatial elements and the original terrain data set, and extract all nodes in the target city spatial elements to form a node set;
[0039] A construction module, used for constructing a city space range mask according to the node set;
[0040] A clipping module, used for clipping the original terrain data set with the urban space range mask to obtain target terrain data;
[0041] A generating module, used for generating a terrain subdivision grid according to the target terrain data;
[0042] An elevation demarcation point value determination module is used to analyze the elevation distribution of each division line in the terrain division grid and determine the elevation demarcation point value;
[0043] A multi-resolution surface data determination module, used for filtering the pixel values in the target terrain data using the elevation demarcation point value to obtain multi-resolution surface data;
[0044] The city range terrain data determination module is used to mosaic the multi-resolution surface data into the original terrain data set to obtain the city range terrain data.
[0045] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0046] The present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned method when calling the computer program in the memory.
[0047] The present application provides a method for processing urban-scale terrain data, comprising: obtaining a target urban spatial element and an original terrain data set, extracting all nodes in the target urban spatial element to form a node set; constructing an urban spatial range mask according to the node set; clipping the original terrain data set with the urban spatial range mask to obtain target terrain data; generating a terrain subdivision grid according to the target terrain data; analyzing the elevation distribution of each subdivision line in the terrain subdivision grid to determine an elevation dividing point value; filtering pixel values in the target terrain data using the elevation dividing point value to obtain multi-resolution surface data; and mosaicking the multi-resolution surface data into the original terrain data set to obtain urban-scale terrain data.
[0048] This application generates a mask that includes the city range, and then crops the original terrain data. Based on the morphological structure of the terrain data itself, the application determines the best terrain filtering interval, that is, determines the dividing point, according to the distribution characteristics of the elevation values within the dividing line, so as to make full use of the terrain information. The terrain within the interval is directly based on pixel operations, which is highly efficient and does not require complex operations such as triangulation. Compared with existing local smoothing and other processing solutions, the terrain data processed by this application is continuously distributed, which can further eliminate the terrain fluctuations within the city range, and can effectively solve the problem of distortion caused by terrain fluctuations of linear features such as traffic lines and rivers, and can achieve better results in urban three-dimensional visualization application scenarios. At the same time, the distribution characteristics of urban spatial elements are taken into account, and the focus is on achieving better visual effects for urban three-dimensional space application scenarios, especially terrain processing solutions that achieve the best display effects for elements such as buildings, traffic lines, facilities, and water bodies.
[0049] The present application also provides a city-wide terrain data processing system, a computer-readable storage medium and an electronic device, which have the above-mentioned beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0051] Figure 1 A flowchart of a method for processing urban terrain data provided by an embodiment of the present application;
[0052] Figure 2 A schematic diagram of a city space range mask provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of a terrain subdivision grid provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of the elevation of the target terrain provided in the embodiment of the present application;
[0055] Figure 5 An elevation scatter plot provided by an embodiment of the present application;
[0056] Figure 6 The processed elevation scatter plot provided in the embodiment of the present application;
[0057] Figure 7 A city-wide terrain data map based on an original terrain data set provided in an embodiment of the present application;
[0058] Figure 8 A city-wide topographic data map based on the multi-resolution surface data provided in an embodiment of the present application;
[0059] Fig. 9 A schematic diagram of the structure of a city-wide terrain data processing system provided in an embodiment of the present application;
[0060] Fig.10 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0062] The object information involved in this application, including but not limited to the object device information, object personal information, etc., and data, including but not limited to data used for analysis, stored data, displayed data, etc., are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the laws, regulations and standards of relevant countries and regions.
[0063] See also Figure 1 , Figure 1 A flowchart of a method for processing urban terrain data provided by an embodiment of the present application, the method comprising:
[0064] S101: Acquire a target city spatial element and an original terrain data set, and extract all nodes in the target city spatial element to form a node set;
[0065] S102: constructing a city space range mask according to the node set;
[0066] S103: clipping the original terrain data set with the urban space range mask to obtain target terrain data;
[0067] S104: generating a terrain subdivision grid according to the target terrain data;
[0068] S105: Analyze the elevation distribution of each division line in the terrain division grid to determine the elevation boundary point value;
[0069] S106: Filter the pixel values in the target terrain data using the elevation demarcation point value to obtain multi-resolution surface data;
[0070] S107: Mosaic the multi-resolution surface data into the original terrain data set to obtain city-wide terrain data.
[0071] First, obtain the target city space elements, which may include building outlines, facility outlines, road networks, water bodies, etc. Elements consist of two parts: geometric graphics and non-geometric attributes such as number, name, owner, etc. The node set of the city element is the node set of its collection graph, which is a point distribution. Therefore, a point-distributed node set can be generated based on the node collection graph.
[0072] Then, in step S102, a city space range mask is constructed, see Figure 2 , Figure 2 A schematic diagram of the urban space range mask provided in an embodiment of the present application.
[0073] In a feasible implementation, when constructing the urban space range mask, a convex hull can be first constructed based on the node set to generate the original space range, so that within the original space range, a buffer zone is constructed for the convex hull with a preset distance as the buffer radius to obtain a graph, and the graph is used as the urban space range mask. The convex hull (the nodes constitute the node set Convex, the convex hull Hull) refers to a real vector space V, for a given set X, the intersection S of all convex sets containing X is called the convex hull of X. In two-dimensional space, it can be regarded as a rubber band containing all points.
[0074] Specifically, the convex hull H can be constructed with the nodes constituting the node set C to generate the original spatial range. Due to the spatial characteristics of the convex hull, it can cover all points for constructing the convex hull. Therefore, constructing the convex hull with the nodes constituting the node set C can cover all urban spatial elements, so that the distribution range of urban spatial elements can be fully determined.
[0075] Then, using distance d as the buffer radius, a buffer is constructed for the convex hull H to obtain a graph M, and graph M is used as the urban space mask: Directly using the convex hull of the node set C as the urban space mask will have some problems. Specifically, when the spatial element is too close to the convex hull H or one of its edges coincides with the edge of the convex hull H, due to the accuracy calculation, there will be jagged or even mold penetration between the terrain and the element 3D objects outside the mask. Therefore, it is necessary to expand the range of the convex hull, and a buffer can be created for the convex hull H with a specified distance d, that is, to ensure that there is a certain distance between the urban element and the mask. d is a suitable value. A feasible way to calculate the d value can be used as follows:
[0076] ;
[0077] where d ij The spatial distance between any two points in the node set C constitutes the node.
[0078] In step S103, the original terrain data set needs to be clipped with the urban space range mask to obtain target terrain data. Figure 3 , Figure 3 A schematic diagram of a terrain subdivision grid provided in an embodiment of the present application.
[0079] The purpose of terrain segmentation is to obtain the elevation boundary value from the morphological characteristics of the terrain itself, so as to filter the terrain. Since the segmentation line is linear, a single segmentation line cannot represent all the terrain features in the target terrain data, so it is necessary to use multiple segmentation lines to determine the final boundary value.
[0080] In order to better cover the target terrain data, multiple segmentation lines can form grids with the same interval. A feasible process for obtaining the terrain segmentation grid G can be as follows:
[0081] a. Calculate the circumscribed rectangular box R of the convex hull H;
[0082] b. Calculate the horizontal distance Widt convex hull H of the circumscribed rectangular box R R and vertical convex hull Hei terrain grid G convex hull Ht R , and the minimum value of the two is recorded as Dist R ;
[0083] c. Starting from the upper left corner of R, R Generate a grid for the spacing pair R, where dR is calculated as follows:
[0084] ;
[0085] In the above formula, n is an appropriate value. A smaller n will cause the grid to be too rough and difficult to represent most of the terrain information in the target terrain data TT. A larger n will result in a larger number of grid lines, resulting in a larger amount of calculation in the subsequent calculation of the convex hull of the elevation decomposition value.
[0086] d. Use the grid lines of the grid (excluding the boundary of R) as the terrain subdivision grid G.
[0087] After generating the terrain subdivision grid, we can further analyze the elevation distribution of each subdivision line in the terrain subdivision grid and determine the elevation boundary point value.
[0088] The specific steps may include:
[0089] The first step is to analyze the elevation distribution of each subdivision line in the subdivision grid and determine the convex hull of the elevation boundary value;
[0090] Step 2: For each grid line in the terrain subdivision grid, the target terrain data is subdivided with any endpoint as the starting point;
[0091] Step 3: sort the elevations divided by the terrain grid of each dividing line in reverse order to obtain a set, and draw a scatter plot based on the set;
[0092] Step 4: taking the turning point between the higher elevation and the lower elevation in the scatter plot as the dividing point;
[0093] Step 5: determining the elevation filtering value on the grid line according to the demarcation point;
[0094] Step 6: draw an elevation difference scatter plot with the elevation as the horizontal axis and the elevation difference as the vertical axis, and determine the convex hull of the elevation value of the dividing point based on the elevation difference scatter plot;
[0095] Step 7: taking the mean value of the convex hull of the elevation value determined by each grid line in the terrain subdivision grid as the elevation demarcation point value of the target terrain data.
[0096] For each dividing line of the terrain dividing grid G, the target terrain data TT is divided with any endpoint as the starting point. The terrain division can be realized by using the Pat convex hull H Profile tool of the terrain division grid Global graphics Mapper, where the horizontal axis is the distance from the starting point of the dividing line and the vertical axis is the elevation of the target terrain. Figure 4 As shown, Figure 4 This is a schematic elevation diagram of the target terrain provided in an embodiment of the present application.
[0097] pass Figure 4 It can be seen that most areas on the dividing line are within a certain elevation range, and the elevations outside this range exist in isolation. This shows that the majority of the urban space is composed of relatively flat terrain with low elevations, which needs to be filtered, while the minority is composed of relatively scattered areas with high elevations, which may be mountains in the city and should be retained.
[0098] To further analyze the distribution characteristics of elevation, the elevations obtained by the terrain grid Gi are sorted in reverse order to obtain a set V, and a scatter plot is drawn, where the vertical axis is the elevation v i ,like Figure 5 As shown, Figure 5 This is an elevation scatter plot provided by the embodiment of this application. Figure 5 It can be seen that there is a clear turning point between the higher elevation and the lower elevation, and this turning point is named the dividing point. After determining the dividing point, the elevation filtering value on the dividing line is determined.
[0099] To determine the dividing point more accurately, the elevation v i is the horizontal axis, v i+1 -v i The elevation difference scatter plot drawn for the vertical axis is as follows Figure 6 As shown, Figure 6 This is a processed elevation scatter plot provided in an embodiment of the present application.
[0100] exist Figure 6 It can be clearly found that the scattered points are divided into two parts: clustered and discrete. The dividing part is the dividing point. The lower elevation and relatively gentle part of the urban space account for the majority, while the higher elevation and relatively steep part account for the majority. The elevation value convex hull H of the dividing point can be determined by visual observation. i .
[0101] The convex hull H of the elevation value of the dividing point determined by each grid line in the terrain subdivision grid G is i The mean of is taken as the convex hull H of the elevation value of the dividing point of the target terrain data TT, that is:
[0102] ;
[0103] Among them, the lowest point v 图形Min The interval between the convex hull H is the filtering interval, that is, [v 图形Min , convex hull H], since V is arranged in reverse order, v 图形Min That is v n , n is the length of set V.
[0104] The multi-resolution surface data TF (TerrainFactor based on Multi-resolution Surface Data) is obtained by filtering the pixel values in the target terrain data TT with the convex hull H. Specifically, the pixels in the target terrain data TT can be traversed, and the pixel values in the target terrain data TT that are lower than the convex hull H are assigned to the convex hull H, and the pixel values that are greater than the convex hull H are retained.
[0105] Finally, city-wide terrain data is generated with the original terrain dataset as a base and the multi-resolution surface data as a base. Figure 7 and Figure 8 , Figure 7 The city-wide terrain data map based on the original terrain data set provided in the embodiment of the present application is Figure 8 A city-wide topographic data map based on the multi-resolution surface data provided in an embodiment of the present application;
[0106] This application generates a mask that includes the city range, and then crops the original terrain data. Based on the morphological structure of the terrain data itself, the application determines the best terrain filtering interval, that is, determines the dividing point, according to the distribution characteristics of the elevation values within the dividing line, so as to make full use of the terrain information. The terrain within the interval is directly based on pixel operations, which is highly efficient and does not require complex operations such as triangulation. Compared with existing local smoothing and other processing solutions, the terrain data processed by this application is continuously distributed, which can further eliminate the terrain fluctuations within the city range, and can effectively solve the problem of distortion caused by terrain fluctuations of linear features such as traffic lines and rivers, and can achieve better results in urban three-dimensional visualization application scenarios. At the same time, the distribution characteristics of urban spatial elements are taken into account, and the focus is on achieving better visual effects for urban three-dimensional space application scenarios, especially terrain processing solutions that achieve the best display effects for elements such as buildings, traffic lines, facilities, and water bodies.
[0107] In addition, if the boundary is defined in advance by the convex hull, there is no need to use a complex search method to determine the boundary, and the algorithm implementation is relatively simple.
[0108] See also Fig. 9 , Fig. 9 This is a schematic diagram of the structure of a city-wide terrain data processing system provided in an embodiment of the present application. The present application also provides a city-wide terrain data processing system, including:
[0109] An extraction module is used to obtain the target city spatial elements and the original terrain data set, and extract all nodes in the target city spatial elements to form a node set;
[0110] A construction module, used for constructing a city space range mask according to the node set;
[0111] A clipping module, used for clipping the original terrain data set with the urban space range mask to obtain target terrain data;
[0112] A generating module, used for generating a terrain subdivision grid according to the target terrain data;
[0113] An elevation demarcation point value determination module is used to analyze the elevation distribution of each division line in the terrain division grid and determine the elevation demarcation point value;
[0114] A multi-resolution surface data determination module, used for filtering the pixel values in the target terrain data using the elevation demarcation point value to obtain multi-resolution surface data;
[0115] The city range terrain data determination module is used to mosaic the multi-resolution surface data into the original terrain data set to obtain the city range terrain data.
[0116] Based on the above embodiment, as an optional embodiment, the extraction module includes:
[0117] A first determination unit is used to determine all nodes of the target urban spatial elements; the nodes include building outlines, facility outlines, road networks and water bodies;
[0118] The first generating unit is used to generate a node set with point distribution according to the node set graph.
[0119] Based on the above embodiment, as an optional embodiment, the cutting module includes:
[0120] A second generating unit is used to construct a convex hull according to the node set to generate an original space range;
[0121] The construction unit is used to construct a buffer zone for the convex hull within the original space range with a preset distance as a buffer radius to obtain a graph, and use the graph as a mask of the urban space range.
[0122] Based on the above embodiment, as an optional embodiment, it also includes:
[0123] The preset distance determination module is used to determine the preset distance according to the inverse of the maximum value of the spatial distance between any two nodes in the node set.
[0124] Based on the above embodiment, as an optional embodiment, the generating module includes:
[0125] A first calculation unit, used for calculating the circumscribed rectangular frame of the convex hull;
[0126] A second calculation unit is used to calculate the horizontal distance and the vertical distance of the circumscribed rectangular frame, and the minimum value of the horizontal distance and the vertical distance; the minimum value is used to calculate the set spacing;
[0127] A grid generation unit, configured to generate a grid for the circumscribed rectangular frame with the upper left corner of the circumscribed rectangular frame as a starting point and with the set spacing;
[0128] The terrain subdivision grid determination module is used to use the grid lines of the grid as the terrain subdivision grid; wherein the grid lines do not include the boundaries of the outer rectangular frame.
[0129] Based on the above embodiment, as an optional embodiment, the elevation demarcation point value determination module includes:
[0130] A second determining unit is used to analyze the elevation distribution of each subdivision line in the subdivision grid and determine the convex hull of the elevation boundary value;
[0131] A partitioning unit, for partitioning each grid line in the terrain partitioning grid, taking any end point as a starting point, to partition the target terrain data;
[0132] A drawing unit, used for sorting the elevations divided by the terrain grid of each dividing line in reverse order to obtain a set, and drawing a scatter plot according to the set;
[0133] A demarcation point determination unit, configured to use the turning point between the higher elevation and the lower elevation in the scatter plot as a demarcation point;
[0134] An elevation filter value determination unit, used to determine the elevation filter value on the grid line according to the demarcation point;
[0135] An elevation value convex hull determining unit, used to draw an elevation difference scatter plot with elevation as the horizontal axis and elevation difference as the vertical axis, and determine the elevation value convex hull of the demarcation point based on the elevation difference scatter plot;
[0136] The elevation demarcation point value determination unit is used to use the average of the elevation value convex hulls determined by each grid line in the terrain demarcation grid as the elevation demarcation point value of the target terrain data.
[0137] Based on the above embodiment, as an optional embodiment, the city range terrain data determination module includes:
[0138] A city-wide terrain data determination unit is used to generate city-wide terrain data using the original terrain data set as a basis and using the multi-resolution surface data as a basis.
[0139] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0140] The present application also provides an electronic device, see Fig.10 , a structural diagram of an electronic device provided in an embodiment of the present application, such as Fig.10 As shown, a processor 1410 and a memory 1420 may be included.
[0141] Among them, the processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0142] The memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is at least used to store the following computer program 1421, wherein, after the computer program is loaded and executed by the processor 1410, it can implement the relevant steps in the method performed by the electronic device side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.
[0143] In some embodiments, the electronic device may further include a display screen 1430 , an input / output interface 1440 , a communication interface 1450 , a sensor 1460 , a power source 1470 , and a communication bus 1480 .
[0144] certainly, Fig.10 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Fig.10 More or fewer components than shown, or combinations of certain components.
[0145] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the system provided in the embodiment, since it corresponds to the method provided in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0146] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0147] It should also be noted that, in this specification, relational terms such as first and second, etc. 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 "comprise", "include" 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for processing urban terrain data, characterized in that: include: Acquire a target city spatial element and an original terrain data set, and extract all nodes in the target city spatial element to form a node set; constructing a city space range mask based on the node set; Clipping the original terrain data set with the urban space range mask to obtain target terrain data; Generate a terrain subdivision grid according to the target terrain data; Analyze the elevation distribution of each dividing line in the terrain dividing grid to determine the elevation dividing point value; Filtering pixel values in the target terrain data using the elevation cutoff point value to obtain multi-resolution surface data; The multi-resolution surface data is mosaicked into the original terrain data set to obtain city-wide terrain data.
2. The method for processing urban terrain data according to claim 1, characterized in that: Extracting all nodes of the target city spatial elements to form a node set includes: Determine all nodes in the target city spatial elements; the nodes include building outlines, facility outlines, road networks and water bodies; Generate a point-distributed node set based on the node set graph.
3. The method for processing urban terrain data according to claim 1, characterized in that: The step of constructing a city space range mask according to the node set comprises: Construct a convex hull according to the node set to generate an original spatial range; Within the original space range, a buffer zone is constructed for the convex hull with a preset distance as a buffer radius to obtain a graph, and the graph is used as a mask of the urban space range.
4. The method for processing urban terrain data according to claim 3, characterized in that: Also includes: The preset distance is determined according to the reciprocal of the maximum value of the spatial distance between any two nodes in the node set.
5. The method for processing urban terrain data according to claim 1, characterized in that: Generating a terrain grid according to the target terrain data includes: Calculate the circumscribed rectangular frame of the convex hull; Calculating the horizontal distance and the vertical distance of the circumscribed rectangular frame, and the minimum value of the horizontal distance and the vertical distance; the minimum value is used to calculate the set spacing; Taking the upper left corner of the circumscribed rectangular frame as the starting point, generating a grid for the circumscribed rectangular frame with the set spacing; The grid lines of the grid are used as a terrain subdivision grid; wherein the grid lines do not include the boundaries of the outer rectangular frame.
6. The method for processing urban terrain data according to claim 1, characterized in that: Analyzing the elevation distribution of each dividing line in the terrain dividing grid and determining the elevation dividing point value includes: Analyze the elevation distribution of each subdivision line in the subdivision grid to determine the convex hull of the elevation boundary value; For each grid line terrain subdivision grid in the terrain subdivision grid, taking any endpoint as a starting point, subdividing the target terrain data; The elevations divided by the terrain division grid of each division line are sorted in reverse order to obtain a set, and a scatter plot is drawn according to the set; The turning point between the higher elevation and the lower elevation in the scatter plot is used as a dividing point; Determine the elevation filtering value on the grid line according to the demarcation point; Draw an elevation difference scatter plot with elevation as the horizontal axis and elevation difference as the vertical axis, and determine the convex hull of the elevation value of the dividing point based on the elevation difference scatter plot; The average value of the convex hull of the elevation value determined by each grid line in the terrain subdivision grid is used as the elevation dividing point value of the target terrain data.
7. The method for processing urban terrain data according to claim 1, characterized in that: Mosaicing the multi-resolution surface data into the original terrain data set to obtain city-wide terrain data includes: City-wide terrain data is generated based on the original terrain dataset and based on the multi-resolution surface data.
8. A city-wide terrain data processing system, characterized in that: include: An extraction module is used to obtain the target city spatial elements and the original terrain data set, and extract all nodes in the target city spatial elements to form a node set; A construction module, used for constructing a city space range mask according to the node set; A clipping module, used for clipping the original terrain data set with the urban space range mask to obtain target terrain data; A generating module, used for generating a terrain subdivision grid according to the target terrain data; An elevation demarcation point value determination module is used to analyze the elevation distribution of each division line in the terrain division grid and determine the elevation demarcation point value; A multi-resolution surface data determination module, used for filtering the pixel values in the target terrain data using the elevation demarcation point value to obtain multi-resolution surface data; The city range terrain data determination module is used to mosaic the multi-resolution surface data into the original terrain data set to obtain the city range terrain data.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for processing urban terrain data according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the method for processing urban terrain data as claimed in any one of claims 1 to 7 are implemented.
