DEM file processing method, electronic device and storage medium

By establishing primary and secondary indexes in DEM file processing, the problem of excessive file size in large-scale elevation data processing is solved, and processing efficiency and maintainability are improved.

CN119621668BActive Publication Date: 2025-05-16TUXI DIGITAL TECH (BEIJING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510162778.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-16
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

When processing elevation data in large areas, the size of a single DEM file is large, resulting in problems in file system, program processing complexity and compression efficiency.

Method used

By establishing primary and secondary indexes for finding target DEM files, avoiding merging all DEM files, and adopting a two-layer indexing strategy to manage and find elevation data.

Benefits of technology

Reduces system overhead, improves data processing efficiency and maintainability, and achieves faster data access and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621668B_ABST
    Figure CN119621668B_ABST
Patent Text Reader

Abstract

The present application provides a DEM file processing method, electronic device and storage medium, the method comprising: obtaining a plurality of DEM files to be processed; establishing a primary index for searching a target DEM file, and establishing a secondary index for searching data in the target DEM file; wherein the target DEM file is determined according to one or more of the DEM files to be processed. According to the present application, all DEM files are avoided from being merged, and a double-layer indexing strategy is adopted, that is, all DEM files and the elevation data in the files are indexed and managed by establishing a primary index and a secondary index. In this way, not only can the system overhead be reduced, but also the data processing efficiency and maintainability 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 DEM file processing method, electronic equipment and storage medium. Background Art

[0002] Generally, the elevation data of a certain area is stored in a series of files (usually in GeoTIFF format, which is a geospatial data file format), which are usually called DEM (Digital Elevation Model) files. Since the size of a single DEM file is large (ranging from hundreds of MB to tens of GB), when these DEM files describe a large area together, the overall data volume will be very large. If the elevation data of the entire area is merged into a single DEM file, it may cause more problems in the file system, program processing complexity and compression efficiency. Summary of the invention

[0003] The embodiments of the present application provide a DEM file processing method, an electronic device and a storage medium to solve one or more of the above-mentioned technical problems.

[0004] In a first aspect, an embodiment of the present application provides a DEM file processing method, comprising: obtaining multiple DEM files to be processed; establishing a primary index for searching for a target DEM file, and establishing a secondary index for searching for data in the target DEM file; wherein the target DEM file is determined based on one or more of the DEM files to be processed.

[0005] In a second aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the methods described above when executing the computer program.

[0006] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the methods described above is implemented.

[0007] Compared with the related art, this application has the following advantages:

[0008] The present application provides a DEM file processing method, including: obtaining multiple DEM files to be processed; establishing a primary index for searching a target DEM file, and establishing a secondary index for searching data in the target DEM file; wherein the target DEM file is determined according to one or more of the DEM files to be processed. According to an embodiment of the present application, all DEM files are avoided from being merged, and a double-layer indexing strategy is adopted, that is, by establishing a primary index and a secondary index, all DEM files and the elevation data in the files are indexed and managed. In this way, not only can the system overhead be reduced, but also the data processing efficiency and maintainability can be improved.

[0009] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.

[0011] Figure 1 A flow chart of a DEM file processing method provided in an embodiment of the present application is shown;

[0012] Figure 2 A schematic diagram of a quadtree splitting process provided in an embodiment of the present application is shown;

[0013] Figure 3 A grid cutting and merging flow chart provided in an embodiment of the present application is shown;

[0014] Figure 4 A schematic diagram of a leaf node logical partitioning process provided in an embodiment of the present application is shown;

[0015] Figure 5 A schematic diagram of a logical block index representation provided in an embodiment of the present application is shown;

[0016] Figure 6 A schematic diagram of a process for generating a terrain slice provided in an embodiment of the present application is shown;

[0017] Figure 7 A schematic diagram of a rendering result including cracks provided in an embodiment of the present application is shown;

[0018] Figure 8A schematic diagram of a data slice region expansion result provided in an embodiment of the present application is shown;

[0019] Fig. 9 A schematic diagram of a process of reading elevation data provided in an embodiment of the present application is shown;

[0020] Fig.10 A schematic diagram of elevation data points provided in an embodiment of the present application is shown;

[0021] Fig.11 A schematic diagram of regional feature points and vertices provided in an embodiment of the present application is shown;

[0022] Fig.12 A schematic diagram of boundary points including a vacant area provided in an embodiment of the present application is shown;

[0023] Fig.13 A schematic diagram of a triangulated network constructed using a traditional grid method provided in an embodiment of the present application is shown;

[0024] Fig.14 A schematic diagram of a triangulated network constructed with 13 as the current level height difference calculation threshold provided in an embodiment of the present application is shown;

[0025] Fig.15 A schematic diagram of a triangulated network constructed with 12 as the current level height difference calculation threshold provided in an embodiment of the present application is shown;

[0026] Fig.16 A schematic diagram of a triangulated network constructed by calculating a height difference threshold with 12 as the current level and a terrain quality factor of 0.1 provided in an embodiment of the present application is shown;

[0027] Fig.17 A schematic diagram of a terrain triangulated mesh generated from DEM data provided in an embodiment of the present application is shown;

[0028] Fig.18 An effect diagram showing a superimposed image provided in an embodiment of the present application is shown;

[0029] Fig.19 An effect diagram showing the fusion of real-time sliced ​​urban area terrain with other types of data under the effect of a heat map is shown in an embodiment of the present application;

[0030] Fig. 20 A schematic diagram of time-consuming results of requesting different methods provided in an embodiment of the present application is shown;

[0031] Fig.21 A block diagram of an electronic device used to implement an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the concept or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary in nature and not restrictive.

[0033] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.

[0034] First, the terms involved are explained.

[0035] Digital elevation model is a digital simulation of the ground terrain (i.e., a digital expression of the terrain surface morphology) achieved through limited terrain elevation data. It is a physical ground model that represents the ground elevation in the form of a set of ordered numerical arrays. It is a branch of the Digital Terrain Model (DTM), and other terrain characteristic values ​​can be derived from it. Using the Global Positioning System (GPS), combined with radar and laser altimeters, DEM information of fixed areas can be collected. In the field of aerospace, large-scale DEM information can also be obtained through photogrammetry.

[0036] Object-Based Storage is a data storage architecture that manages data as discrete objects, rather than as a collection of files like a file system or as a sequence of bytes within a sector like block storage. Each object includes the data itself, metadata, and a globally unique identifier (usually called an object key or object ID). This architectural design is intended to simplify data management and improve the efficiency of large-scale distributed systems.

[0037] Triangulation is a common method used in Geographic Information System (GIS) to represent two-dimensional and three-dimensional objects, corresponding to the representation of surfaces and volumes in geographic information. When using DEM information to construct triangulation, the following two methods are mostly used:

[0038] Regular grid DEM: Elevation is regarded as pixel, and the grid constructed by image pixels is regarded as rectangular grid. Each grid is composed of two right triangles. N squares form a terrain grid. The length and width of each rectangular grid are adjusted to control the amount of data. This method is simple and easy, but the amount of data stored is large. The more refined the grid is, the more data required will increase exponentially, and taking points according to the rules cannot guarantee the terrain characteristics to the greatest extent.

[0039] Irregular triangulated network (TIN) model: In order to solve the problem of regular grid, it is necessary to adjust the point selection method. The most common method is to retain important points.

[0040] The method of retaining important points: The core idea is to remove the points considered "unimportant" in the grid, and construct the remaining points into an irregular triangulated network.

[0041] DEM file: Digital Elevation Model file. Unless otherwise specified below, all files are single-channel GeoTIFF files.

[0042] Pyramid Tiling: A technology widely used in geographic information systems. It optimizes data storage, transmission and rendering efficiency by dividing a map or image into multiple small blocks (i.e. tiles, which are referred to as pyramid tiles unless otherwise specified) at different zoom levels. However, it also has some limitations, such as high storage requirements, update complexity and insufficient support for real-time content.

[0043] Pre-slicing: In conventional geographic information services, the data that needs to be displayed in pyramid slices is sliced ​​in advance due to the generation principle and the huge amount of data. The slices are read on demand when used. This method is called pre-slicing. The slice area, size and precision of the slices in the pre-slicing method are fixed.

[0044] Global slicing: When building pre-slices, due to the large amount of file data and slow reading, each step in building the slice is executed on the entire file, and slices are generated in batches to reduce repetitive processes.

[0045] Slice on demand: Build a single slice based on the slice area, size, and precision, and only process the data required by the target slice.

[0046] Real-time slicing: A real-time construction solution for on-demand slicing that produces slices by reading metadata and building them in real time when needed. It has lower storage requirements, higher flexibility, and support for real-time content.

[0047] Regional feature points: When the difference between the elevation value of a point and the average elevation value of the eight surrounding points is greater than the activation threshold of the current level, the point is activated at the current level. The activated point is called a regional feature point.

[0048] Edge overlapping slices: Each time you obtain slice data, you will obtain additional pixels in the border adjacent area. This additional data will be reused in adjacent slices, but will only be used to calculate regional feature points and will not generate regional feature points.

[0049] Hierarchical activation: When activating a regional feature point, the activation status is also passed to the lower levels of the current hierarchy.

[0050] Non-hierarchical activation: When activating regional feature points, they are only activated at the current level and are not transferred to lower levels.

[0051] With the continuous development of various remote sensing satellite technologies, the quality of remote sensing image data is getting higher and higher, and the scale is also getting larger and larger. Applications such as digital mapping, land use analysis, and disaster monitoring can be expressed more accurately to a large extent; as the acquisition of digital elevation models (Digital Elevation Models) becomes simple and accurate, qualified enterprises or local units can obtain massive ground information.

[0052] The cloud service is a common understanding of all industries. With the help of object storage technology, a large amount of data can be stored in the cloud to achieve data cloud access. The terrain data cloud service that can be quickly built and accessed can be combined with the base map to build a digital surface model on some GIS platforms, and has a wide range of uses. For example, railway planning, regional change comparison, and disaster observation play an important role in quickly building a geographical model of an area. The terrain service practice is usually to generate all possible slices through pre-slicing technology, and load them on demand when used. This technology only loads terrain data within the user's current field of view, reducing unnecessary data loading, and is now the standard way of terrain processing.

[0053] When using pre-slicing to build terrain slices, cloud services face a huge problem: the storage and fast access of large amounts of slice data puts pressure on the performance of the service. The traditional slicing method is limited by the data reading method and data volume. When building a grid, a simple method is used to build a right-angle triangle grid, which cannot handle some areas with drastic changes well. When data needs to be updated, traditional slices cannot be updated quickly and need to be reprocessed and published.

[0054] In large-scale 2D and 3D data presentations, most data needs to be sliced ​​in advance to implement 3D data slicing and LOD (Level of Detail) specifications. When the data is uploaded to the cloud, the sliced ​​data needs to occupy a large amount of cloud storage space, which is about three times that of the original data. If the original data is modified, all pre-sliced ​​data needs to be regenerated, which is time-consuming and labor-intensive. In terrain slicing, all slices of the data at all zoom levels need to be generated for each DEM data. After the above method is used to upload the data to the cloud, the terrain data service needs to face the following problems:

[0055] 1. Slow data reading: DEM data is stored in TIFF images. When reading, even if you only care about the data on a certain boundary, you need to read the entire image to obtain the corresponding data. It is impossible to read on demand. Even if many slices are hardly accessed, they must be read and generated in full. This process is limited by the size of a single image data and the actual storage method. The larger the data, the slower the access. This is one of the reasons why most 3D data is produced by pre-slicing.

[0056] 2. A large amount of slice data requires a lot of storage space. Data on the cloud also requires data backup and data error correction, which requires more storage space. When reading, whether based on the file system or object storage technology, when facing a large range of data, access to too much slice data becomes a performance bottleneck for network access.

[0057] 3. Traditional terrain slicing uses right-angled triangle grids (such as Google Maps) during pre-slicing because this method is simpler to calculate and is conducive to large-scale data processing, but it is not flexible enough in expressing terrain.

[0058] Due to data splicing or data resampling, cracks will appear at the slice boundaries. The traditional method is to process them through interpolation algorithms or smoothing boundary points, which will cause some areas with drastic changes to become slopes and lose their original shapes.

[0059] Based on this, the present application provides a DEM file processing method, electronic device and storage medium. The present application can perform real-time terrain slicing, avoid the emergence of a large number of slices and meet the needs of real-time access at the same time, thereby replacing traditional terrain services and solving the above pain points. Based on the DEM file processing method provided by the present application, real-time slicing is used instead of pre-slicing, which avoids the production of a large number of slices, reduces the data production steps, no longer requires a large amount of space to store slices, and no longer considers how to quickly access a large number of slices. The quadtree structure designed in the present application can quickly update the original data, which is suitable for terrain services that need to update data frequently. In the present application, the Delaunay triangulated terrain grid expresses the same number of regional feature points with fewer triangles, reduces the resource usage during page rendering, reduces the requirements for hardware equipment, and reduces the pressure for the superposition rendering of multiple data.

[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0061] This application embodiment provides a DEM file processing method. Figure 1The flowchart of the DEM file processing method according to an embodiment of the present application is shown. The method may include:

[0062] Step S101, obtaining a plurality of DEM files to be processed.

[0063] In the embodiment of the present application, the DEM file to be processed is a DEM file saved in GeoTIFF format. The DEM saved by GeoTIFF can be single-channel data. A plurality of DEM files to be processed are obtained, and the size of the geographic coordinate range corresponding to each DEM file to be processed can be different, and the resolution size of each DEM file to be processed can be different. The DEM file may include but is not limited to: the longitude and latitude of the pixel, and the three dimensions of elevation represented by the pixel value.

[0064] Step S102, establishing a primary index for searching a target DEM file, and establishing a secondary index for searching data in the target DEM file; wherein the target DEM file is determined according to one or more of the DEM files to be processed.

[0065] In the embodiment of the present application, considering that the value of elevation is the target value in terrain generation, the longitude and latitude can be indexed. Therefore, at least based on the geographic coordinate range corresponding to the DEM file to be processed, a primary index for searching the target DEM file is established, wherein the target DEM file is determined according to one or more of the DEM files to be processed, that is, the target DEM file can include all the information in one or more of the DEM files to be processed, or the target DEM file can include part of the information in one or more of the DEM files to be processed. The target DEM file is obtained by combining the information in one or more of the DEM files to be processed, so it can be ensured that the DEM files to be processed of different sizes and resolutions are adjusted according to the requirements of the primary index, so as to facilitate the search of the adjusted target DEM file.

[0066] Afterwards, the elevation data in each target DEM file in the primary index is indexed to facilitate fast and flexible search for data in the target DEM file, that is, a secondary index for searching for data in the target DEM file is established.

[0067] The embodiment of the present application provides a DEM file processing method, including: obtaining multiple DEM files to be processed; establishing a primary index for searching for a target DEM file, and establishing a secondary index for searching for data in the target DEM file; wherein the target DEM file is determined based on one or more of the DEM files to be processed. According to the embodiment of the present application, all DEM files are avoided from being merged, and a double-layer indexing strategy is adopted, that is, by establishing a primary index and a secondary index, all DEM files and the elevation data in the files are indexed and managed. In this way, not only can the system overhead be reduced, but also the data processing efficiency and maintainability can be improved.

[0068] In order to balance the complexity and efficiency of index construction, a first-level index can be established by constructing a quadtree. In a possible implementation, establishing a first-level index for searching a target DEM file can be performed according to the following steps: determining a root node that includes the geographic coordinate range corresponding to the plurality of DEM files to be processed; constructing a quadtree based on the root node, and using the quadtree as the first-level index; wherein the leaf nodes of the quadtree correspond one-to-one to the target DEM file.

[0069] In this possible implementation, first, the scope of the root node of the quadtree and the size of the minimum node can be determined. The scope of the root node can be determined by determining the geographic coordinate scope corresponding to the multiple DEM files to be processed. In order to simplify the calculation, the root node of the quadtree can be constructed based on the scope of the entire DEM data. However, considering that the actual scope of the DEM file may not be a regular rectangle (for example, irregular boundaries or polygonal coverage areas), therefore, in the embodiment of the present application, a positive circumscribed rectangle (Bounding Box, a minimum rectangle that can fully contain the target scope, whose boundaries are parallel to the axis of the coordinate system) is taken as the scope of the root node to ensure that the effective data scope of the DEM file to be processed is fully covered. The following is the specific formula for the scope of the root node:

[0070]

[0071] in Indicates DEMs, Indicates The first points, data points for each DEM .

[0072] In an embodiment of the present application, when establishing an index for searching a target DEM file, i.e., a primary index, each leaf node of the quadtree corresponds to a target DEM file, and these target DEM files are the data that need to be actually read and processed later. The minimum range of the leaf node of the quadtree is determined by the geographic coordinate range of a single target DEM file. It should be noted that the geographic coordinate range corresponding to the target DEM file may not cover the entire preset leaf node range. Therefore, the minimum range of the leaf node is determined by the geographic coordinate range corresponding to the target DEM file contained in the leaf node. The leaf node of the quadtree, i.e., the size of the minimum node, can be determined by presetting the size of a single target DEM file. The leaf nodes of the quadtree correspond one-to-one with the target DEM file, i.e., the data in a target DEM file can be obtained by obtaining the data in a leaf node.

[0073] In order to ensure that the DEM file has good performance in construction, reading, storage, etc., while taking into account the impact of the file format on the reading efficiency, in a possible implementation, a quadtree is constructed based on the root node, which can be performed according to the following steps: the root node is split multiple times until the pixel value corresponding to the current split result is less than a given pixel threshold, and the geographic coordinate range corresponding to the current split result is less than a given geographic coordinate threshold; the multiple DEM files to be processed are cut and merged to obtain leaf nodes that correspond one to one to the previous split results.

[0074] In this possible implementation, based on actual project experience, the size of a single target DEM file is restricted as follows: First, the minimum pixel size: the length or width of each target DEM file must be greater than ρ pixels to avoid files that are too small, which leads to decreased indexing and storage efficiency. Second, the minimum geographic range: considering that some target DEM files may be too detailed, the latitude and longitude range of each target DEM file is further set to not be less than σ (in degrees). This ensures the reasonable distribution of data in geographic space. The specific minimum node constraint formula is as follows:

[0075]

[0076] in, Refers to the pixel width and height of the target DEM file; Refers to the longitude and latitude range covered by the target DEM file.

[0077] In the present application embodiment, through pixel constraint and geographic range constraint, can construct a quadtree data structure.It should be noted that in the same batch of DEM files, the resolution of pixels (i.e. the geographic range represented by each pixel) should be consistent.If the pixel resolution is not uniform, then it is necessary to carry out standardization by methods such as downsampling or linear interpolation to ensure that the pixel resolution is consistent.In the present application embodiment, the quadtree structure carried out when the pixel resolution is uniform is constructed.

[0078] See also Figure 2 The diagram of a quadtree splitting process is shown in Figure 1. Due to the consistent pixel resolution, the minimum node constraint (i.e., the range of a single leaf node) at any position in the entire DEM area is consistent. Therefore, the quadtree is a regular full quadtree, and each non-leaf node is evenly split into four child nodes. The specific structure is as follows: Figure 2 shown.

[0079] exist Figure 2 In the figure, the first largest rectangle represents the root node. The root node is split for the first time, and the split result is four child nodes. The four child nodes are split separately, and four child nodes are obtained respectively. Each time the split is performed, it is calculated whether the pixel value corresponding to the latest child node in the current split result is less than the given pixel threshold, and whether the geographic coordinate range corresponding to the latest child node is less than the given geographic coordinate threshold. If both are less than the given threshold, the child node in the previous split result is used as a leaf node. It should be noted that in the embodiment of the present application, the geographic coordinate threshold may include a longitude threshold and a latitude threshold. The geographic coordinate range is less than the given geographic coordinate threshold, which may be that the difference between the maximum and minimum values ​​of the longitude is less than the given longitude threshold, and the difference between the maximum and minimum values ​​of the latitude is less than the given latitude threshold.

[0080] After obtaining the range of each leaf node, the DEM file of each leaf node is generated. However, the range of each leaf node may be inconsistent with the range of the DEM file to be processed. It is necessary to adjust the DEM file to be processed by raster cutting and merging, and make the adjusted target DEM file correspond to the leaf node of the quadtree one by one. Figure 3 A raster cutting and merging flow chart is shown: the brown solid line frame represents the range of the leaf node, the light-colored small grid represents the data of the DEM file to be processed, and the DEM file to be processed is cut and merged to obtain the target DEM file corresponding to the leaf node. Among them, cutting the DEM file to be processed means cutting the data in the DEM to be processed according to the range corresponding to the leaf node, and merging the DEM file to be processed means combining the cutting results according to the range corresponding to the leaf node. Figure 3In the figure, the range in the brown solid line box belongs to the range corresponding to the leaf node, and the range in each light-colored grid in the brown solid line box belongs to the data in the DEM file to be processed.

[0081] After the above steps, we can get a complete quadtree index and the DEM data corresponding to each leaf node. This is the complete first-level index.

[0082] In order to avoid the DEM being too fragmented and thus affecting the reading efficiency of the file system, the leaf node files of the quadtree in the primary index will not be particularly small. Generally, the size of each DEM file can be set between 1GB and 10GB. Random reading of files of this amount of data is still very inefficient. The traditional method requires reading the entire file to obtain the required data when reading files in GeoTIFF format, which is very inflexible. Therefore, in a possible implementation, a secondary index for searching data in the target DEM file is established, which can be performed according to the following steps: dividing the target DEM file into multiple logical blocks, recording the block size and block starting position of the logical block; determining the index number of the logical block, and determining the logical block index table based on the block size, the block starting position and the index number; using the logical block index table as the secondary index.

[0083] In this possible implementation, DEM files are usually stored in rows. In order to improve the random reading efficiency of DEM files, considering that random reading is range reading, the embodiment of the present application uses a logical block method to convert the DEM file into block storage without changing the original storage structure of the DEM file, thereby improving the data access speed. Figure 4 The following is a schematic diagram of the leaf node logical partitioning process. The following are the steps for logically partitioning a single DEM data:

[0084] exist Figure 4 In the figure, the rectangle where GeoTIFF is located represents a leaf node, which corresponds to a target DEM file. The leaf node is logically divided into multiple logical blocks, that is, the target DEM file is divided into multiple logical blocks. The division process includes: starting from the upper left corner, the DEM file is divided into several small blocks with α elevation data as the side length. Each small block contains α×α elevation data to form a logical storage unit. For the right and lower boundaries of the DEM file, if the remaining elevation data is not enough to form a complete α×α block, the remaining data is retained to form an incomplete small block. This ensures that all elevation data of the DEM file are included in the logical block to avoid data loss.

[0085] Design numbers for logic blocks, i.e. index numbers. Logic blocks are distributed in two dimensions, and each logic block is express, is the row number, is the column number, starting from the upper left corner. Preferably, the row and column numbers start from 0 and increase. The main function of the logic block is to indicate the actual position of each block, so the logic block needs to record the block size (length and width) and the block starting position. is the row number, is the column number, Represents the width of the DEM data. The calculation formula for the block start position (logical block offset) is as follows:

[0086]

[0087] When reading a logical block, the logical block offset ( )、Logical block width( ) and logical block height ( ) three data, you can extract the elevation data within the logical block line by line, and combine them into a complete two-dimensional array to represent the elevation data of the logical block. Each block needs to be read Row data, the starting position of each row of data is:

[0088]

[0089] in is the row index in the current logical block (starting from 0 and increasing). The range of each row of data is:

[0090] .

[0091] After the logic blocks are constructed, a method is needed to quickly access these logic blocks. In the embodiment of the present application, a method of constructing a logic block index table is adopted to meet the requirement of fast positioning during use. In the above steps, the method of reading the logic block through the three data of logic block offset, logic block width and logic block height is explained, so the logic block index table only needs to record these three attributes to meet the requirement of accessing the logic block.

[0092] In the implementation, the logical block index table is represented by an array, and the number (index number), offset and size of each logical block are written into the entry of the logical block index table, which supports fast random access and the actual storage location can be quickly located. Figure 5 As shown. Figure 5 In the figure, (x, y) represents the index number of the logical block, which means that the logical block is located in the xth row and yth column of the target DEM file. The logical block offset is the starting position of the block, which is used to locate the logical block. The logical block width and logical block height can be used to quickly read the data belonging to the logical block.

[0093] In an embodiment of the present application, after constructing the logical block index, when data needs to be read, the geographic coordinates of the area given by the user are first converted into elevation data coordinates through the positional relationship, and then the required logical block is located through the logical block index table, and the data of the specific area in the logical block is read and merged, so that the required data can be quickly obtained.

[0094] It should be noted that in terrain services that require LOD (Level of Detail), in order to reduce the data processing time during subsequent slicing, DEM files of nodes in the first-level index at different resolutions can be generated in advance, and a second-level index can be constructed.

[0095] In this possible implementation, an index is constructed for the elevation data without changing the DEM file of the primary index. The embodiment of the present application adopts a logical block indexing method, and indexes the elevation data in the target DEM file by constructing a logical block index for the target DEM file corresponding to each leaf node. The embodiment of the present application integrates the steps of quadtree and logical block division, and designs an elevation data search structure based on a double-layer index, which solves the problem of slow and inflexible data reading in the prior art.

[0096] In a possible implementation, the method may further perform the following steps: in response to receiving an instruction to search for data corresponding to a given geographic coordinate range, determining a target DEM file to be queried based on the given geographic coordinate range and the primary index, and obtaining data in the target DEM file to be queried according to the secondary index.

[0097] In this possible implementation, see Figure 6 A schematic diagram of the process of generating a terrain slice is shown in FIG. Figure 6 The leftmost figure in the figure represents a complete terrain, in which the red rectangle is the terrain area of ​​interest to the user, i.e., the slice area. The slice area can be determined by a given geographic coordinate range, and the target DEM file to be queried is determined according to the given geographic coordinate range and the primary index, i.e., the DEM data slice of the slice area is obtained ( Figure 6 The second figure from the left in the figure), then, according to the secondary index, the data in the target DEM file to be queried can be obtained, and the elevation data of the slice area can be read ( Figure 6 , third figure from the left).

[0098] In this step, real-time slicing can be achieved based on the primary index and the secondary index, thereby achieving real-time access and obtaining elevation data at a faster speed.

[0099] During real-time access, the actual geographic range represented by the slice is calculated through the slice specification. Then the data is read according to the actual slice geographic range. However, if the data is read directly according to the slice range, the boundary data will lack adjacent points and cracks will appear in the subsequent steps. Figure 7 As shown, the left slice has regional feature points on the boundary, while the right slice does not have such regional feature points. Figure 7 The grid-like area displayed on the right is actually the gap in the final rendering result. Based on this, in a possible implementation, the target DEM file to be queried is determined according to the given geographic coordinate range and the first-level index, and the following steps can be performed: converting the given geographic coordinate range into an elevation data coordinate range; expanding the elevation data coordinate range along the specified elevation data coordinate direction to obtain an updated elevation data coordinate range; determining the target DEM file that intersects with the updated elevation data coordinate range according to the first-level index to obtain the target DEM file to be queried.

[0100] In this possible implementation, the DEM data is organized using a secondary index structure, which makes data reading of the specified area more efficient and convenient. Based on this, when determining the target DEM file to be queried according to the given geographic coordinate range and the primary index, first, the given geographic coordinate conversion range is converted into an elevation data coordinate range, wherein the given geographic coordinate conversion range can be used to determine the geographic area of ​​interest to the user, and the elevation data coordinate range can be used to determine the DEM data corresponding to the geographic area of ​​interest to the user in the DEM file.

[0101] The embodiment of the present application proposes an elevation data search structure based on a double-layer index, which solves the problems of large data reading volume, slow reading speed, and inflexible reading during pre-slicing, provides a prerequisite for subsequent slicing, and then provides a real-time terrain slicing method, which can replace the pre-slicing method used by traditional terrain services.

[0102] In order to avoid the problem of cracks caused by missing adjacent points in the boundary data, the elevation data coordinate range can be expanded along the specified elevation data coordinate direction to obtain an updated elevation data coordinate range, so that the updated elevation data coordinate range includes the boundary data, thereby ensuring that adjacent points in the boundary data are not missed. The specified elevation data coordinate direction can be set according to actual needs, for example, it can be expanded outward in four directions: up, down, left, and right. Figure 8As shown, the dotted rectangular box in the figure represents the coordinate range of the elevation data, and the solid rectangular box represents the updated coordinate range of the elevation data. Among them, the solid box is based on the dotted box and expands the length of one data in the four directions of up, down, left and right respectively. H in the figure represents one elevation data. The specific expansion length is the amount of data required in this direction when calculating the regional feature points based on the data on the range boundary. In the embodiment of the present application, the length of one data. If the calculation method of the regional feature points is different, the expanded length can be modified accordingly.

[0103] Figure 8 The black solid frame in Fig. 9 The black solid line frame in the leftmost figure is the same solid line frame. Figure 8 For example, Figure 8 The rectangles where the four groups of H are located can be used to represent part of the data in a leaf node. The leaf node can be determined according to the primary index, that is, Figure 8 After the four leaf nodes in , there is an intersection between the leaf nodes and the updated elevation data coordinate range represented by the black solid line frame. Therefore, the target DEM files corresponding to these four leaf nodes are all used as the target DEM files to be queried.

[0104] like Figure 8 As shown in the figure, the dotted box represents the actual slice area, the solid box represents the edge overlapping slice area containing the overlapping part, and the area between the two is the overlapping part. It should be noted that the overlapping part is only used as auxiliary data for boundary point calculation and does not participate in the calculation of regional feature points. This method effectively ensures the consistency of the elevation values ​​and related calculation results of boundary points in different slices, and improves the accuracy and reliability of boundary processing. The data slice area is expanded according to the above method as a new data slice area.

[0105] In the embodiment of the present application, the edge overlapping slicing method is used instead when reading data. When constructing terrain slice area data, the edge overlapping slicing method introduces overlapping parts by taking one more elevation data in each of the four directions of the target area. These overlapping data may come from the current file, adjacent files, or may be invalid data areas. The overlapping part provides the necessary reference for calculating the boundary data of the actual slice area, thereby ensuring the accuracy of the calculation results. The embodiment of the present application uses the edge overlapping slicing method instead of the traditional interpolation method to solve the problem of slice boundary cracks, which can retain more terrain information and no longer needs to repair the current slice boundary from other slices.

[0106] In a possible implementation, obtaining data in the target DEM file to be queried according to the secondary index may be performed according to the following steps: obtaining data in the target DEM file to be queried that falls within the coordinate range of the elevation data according to the secondary index.

[0107] In this possible implementation, the data in the target DEM file to be queried that is within the coordinate range of the elevation data is obtained according to the secondary index, and then the read data can be merged. In this step, only the data within the coordinate range of the elevation data is read, see Figure 8 , we can get the black dots in the dotted box (representing data) and the black dots covered by the dotted box to avoid missing data.

[0108] After determining the updated elevation data coordinate range (i.e., the new data slice area), you need to read the required elevation data from the elevation data search structure. Fig. 9 The following instructions are given:

[0109] a) Target node query: query the nodes that intersect with the data slice area in the quadtree. b) Read data slices: The data slice area may intersect with multiple nodes. The intersecting parts are read from each node through the logical block index table and merged into one DEM data. Fig. 9 c) Read the elevation data of the first channel of the DEM data.

[0110] In a possible implementation, the following steps may also be performed: determining the activated feature points of the current level within the elevation data coordinate range; the activated feature points include at least regional feature points and regional vertices; and constructing a triangulated network corresponding to the elevation data coordinates based on the activated feature points.

[0111] In this possible implementation, determining the activation feature points of the current level within the elevation data coordinate range can be performed according to the following steps: Fig.10 Provide explanation.

[0112] like Fig.10 As shown, arrive Indicates 3×3 elevation data points centered at , used to calculate Is it a regional feature point? is the regional mean, and its calculation formula is as follows:

[0113]

[0114] set up is the height difference threshold of the current level, which is calculated as follows:

[0115]

[0116] Where R is the radius of the earth in meters; q is the terrain quality factor, which indicates the quality or accuracy of the terrain data; is the slice width in pixels; is the number of slices at zoom level 0; z is the current level.

[0117] It should be noted that the height difference threshold is a key parameter for determining terrain quality. It can be determined by using multiple reference values ​​and a more complex method, such as slope, altitude, terrain type, urban or mountainous area, etc.

[0118] By calculating the regional mean and The absolute value of the difference is compared with the height difference threshold, that is, When Activated at the current level, also known as regional feature points. In other words, when When the following conditions are met, Activate as a regional feature point.

[0119] .

[0120] It should be noted that in the embodiment of the present application, in order to improve the speed, only eight points around the current point are considered when calculating the regional mean. In actual implementation, a new definition method can also be considered from the entire data slice area, for example, considering fewer or more points around the current point. The embodiment of the present application does not make specific limitations on this.

[0121] In this possible implementation, the activated feature points include at least regional feature points and regional vertices. Fig.11 The left side of the figure shows the state before activation. Each smaller gray dot can be used to represent an elevation data. The larger gray dots on the right side of the figure represent the activated feature points that have been determined. The activated feature points can be used to construct a triangulated network later. Among them, the larger gray dots at the four corners of the black solid line box represent the regional vertices, and the other larger gray dots represent the regional feature points. Fig.11 , only extract regional feature points of the actual slice area, and do not extract regional feature points in the overlapping part of the edge overlapping slice method. Due to the use of non-hierarchical activation, special points need additional processing, among which the four corner vertices of the non-overlapping area are fixedly activated to ensure that the shape of the triangular mesh is consistent with the slice area, which can ensure that a single slice is a regular shape.

[0122] After obtaining all activated feature points, these activated feature points need to be constructed into a triangulated network for rendering the terrain skeleton. It should be noted that, unlike the data of the entire file during pre-slicing, since real-time slicing is a type of on-demand slicing in the embodiment of the present application, a more complex triangulation method can be selected. In the embodiment of the present application, a Delaunay triangulated terrain mesh is used, and all activated feature points are inserted in the area in sequence, and finally a Delaunay triangulated terrain network is constructed. When activating these activated feature points, four vertices and boundary points with no valid data are activated as special points to ensure that the final Delaunay triangulated terrain network boundary is consistent with the original slice.

[0123] In this possible implementation, the empty circle characteristics and maximized minimum angle characteristics of the Delaunay triangular terrain mesh can make the triangulated network more reasonable, and suitable for real-time slicing after comprehensively considering the calculation speed and mesh quality. In the embodiment of the present application, the right-angled triangle mesh is replaced by the Delaunay triangular terrain mesh, making the triangle more flexible, and only retaining the triangles constructed by the regional feature points, and fewer triangles can be used to express the same number of regional feature points. This method is more in line with the characteristics of real-time slicing. When facing pre-slicing, processing a large number of regional feature points at one time will make this method less efficient. The Delaunay triangular terrain mesh is used to construct the grid, which reduces the number of triangles and reduces the rendering pressure. In the embodiment of the present application, other triangulation methods can also be considered to achieve different grids, and the embodiment of the present application does not specifically limit this.

[0124] In this possible implementation, after obtaining the elevation data of the required data slice range, regional feature points are activated from the data slice according to the elevation data. Different from the hierarchical activation method of pre-slicing, the embodiment of the present application adopts non-hierarchical activation, and the activation state is only valid at the current level. This method can obtain the regional feature points required for the current level and reduce the calculation complexity.

[0125] Figure 13-Figure 16 It is a real-time slice single slice display. Figure 13 to Figure 16 All use the same slice data and adjust the current level to achieve LOD (Level of Detail). Fig.13 The triangulated network is constructed using the traditional grid method. Fig.14 Use 13 as the current level to calculate the height difference threshold and construct a triangulated network. Fig.15 Take 12 as the current level to calculate the height difference threshold and build a triangulated network. Fig.16 With 12 as the current level and the terrain quality factor as 0.1, the height difference threshold is calculated and a triangulated network is constructed.

[0126] Figure 17-Figure 19 It is a real-time slice area display. Fig.17Demonstrates the generation of terrain triangulated mesh from DEM data. Fig.18 The effect of superimposing images is shown. Fig.19 It shows the effect of real-time slicing of urban area terrain under heat map effect and fusion with other types of data.

[0127] Fig. 20 The average request time for one thousand requests for terrain slicing under different conditions is shown. In actual projects, users will feel the performance delay within 200 milliseconds immediately, without any sense of lag. In the embodiments of the present application, both high-level and low-level can meet the needs of real-time loading. When requesting, the pre-slicing method only needs to read the pre-generated terrain file, so it is faster; the real-time slicing method is to calculate and build the triangulation network in real time. When constructing high-level slices, a slice will contain the range covered by multiple DEM data, and multiple DEM data need to be read and merged, which will increase the time consumption. After using a specially designed elevation data search structure, even at high-level slicing, the time consumption is within the acceptable range for users. In the traditional way, when slicing on demand at a high level, the request waiting response time will be exceeded, resulting in a request timeout error.

[0128] In a possible implementation, when there is an area with no valid data in the target DEM file to be queried, determining the activation feature points of the current level within the elevation data coordinate range can be performed according to the following steps: determining the boundary points of the area with no valid data, and using the boundary points as the activation feature points of the current level.

[0129] In this possible implementation, when there is a region without valid data in the target DEM file to be queried, the point with the region without valid data among the surrounding points is fixedly activated to retain the shape of the vacant area. Specifically, the region without valid data (i.e. Fig.12 The boundary points of the blank area in the black solid line box on the right side of the DEM file are used as the activated feature points of the current level. It should be noted that in the DEM file, special values ​​will be used to fill the area without valid data. The value of the special value used can be set according to actual needs, and the embodiment of the present application does not make specific limitations on this.

[0130] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a DEM file processing device. The device may include:

[0131] An acquisition module is used to acquire multiple DEM files to be processed; an index module is used to establish a primary index for searching a target DEM file, and to establish a secondary index for searching data in the target DEM file; wherein the target DEM file is determined based on one or more of the DEM files to be processed.

[0132] The present application provides a DEM file processing device, which includes an acquisition module for: acquiring multiple DEM files to be processed; an index module for establishing a primary index for searching a target DEM file, and establishing a secondary index for searching data in the target DEM file; wherein the target DEM file is determined according to one or more of the DEM files to be processed. According to an embodiment of the present application, all DEM files are avoided from being merged, and a double-layer indexing strategy is adopted, that is, by establishing a primary index and a secondary index, all DEM files and the elevation data in the files are indexed and managed. In this way, not only can the system overhead be reduced, but also the data processing efficiency and maintainability can be improved.

[0133] In a possible implementation, the index module is used to: determine a root node that includes a geographic coordinate range corresponding to the multiple DEM files to be processed; construct a quadtree based on the root node, and use the quadtree as the first-level index; wherein the leaf nodes of the quadtree correspond one-to-one to the target DEM files.

[0134] In one possible implementation, the index module is used to: split the root node multiple times until the pixel value corresponding to the current split result is less than a given pixel threshold, and the geographic coordinate range corresponding to the current split result is less than a given geographic coordinate threshold; cut and merge the multiple DEM files to be processed to obtain leaf nodes that correspond one-to-one to the previous split results.

[0135] In a possible implementation, the index module is used to: divide the target DEM file into multiple logical blocks, record the block size and block starting position of the logical block; determine the index number of the logical block, and determine the logical block index table according to the block size, the block starting position and the index number; and use the logical block index table as the secondary index.

[0136] In one possible implementation, the device also includes a data module, which is used to: in response to receiving an instruction to search for data corresponding to a given geographic coordinate range, determine the target DEM file to be queried according to the given geographic coordinate range and the first-level index, and obtain the data in the target DEM file to be queried according to the second-level index.

[0137] In a possible implementation, the data module is specifically used to: convert the given geographic coordinate range into an elevation data coordinate range; expand the elevation data coordinate range along a specified elevation data coordinate direction to obtain an updated elevation data coordinate range; determine a target DEM file that has an intersection with the updated elevation data coordinate range based on the primary index to obtain a target DEM file to be queried.

[0138] In a possible implementation, the data module is specifically used to obtain data within the coordinate range of the elevation data in the target DEM file to be queried according to the secondary index.

[0139] In a possible implementation, the device further includes a construction module, which is used to: determine the activation feature points of the current level within the coordinate range of the elevation data; the activation feature points include at least regional feature points and regional vertices;

[0140] A triangulated network corresponding to the elevation data coordinates is constructed according to the activated feature points.

[0141] In a possible implementation, when there is an area without valid data in the target DEM file to be queried, the construction module is specifically used to: determine the boundary points of the area without valid data, and use the boundary points as activation feature points of the current level.

[0142] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.

[0143] Fig.21 is a block diagram of an electronic device used to implement an embodiment of the present application. Fig.21 As shown, the electronic device includes: a memory 2101 and a processor 2102. The memory 2101 stores a computer program that can be run on the processor 2102. When the processor 2102 executes the computer program, the method in the above embodiment is implemented. The number of the memory 2101 and the processor 2102 can be one or more.

[0144] The electronic device also includes:

[0145] The communication interface 2103 is used to communicate with external devices and perform data exchange transmission.

[0146] If the memory 2101, the processor 2102 and the communication interface 2103 are implemented independently, the memory 2101, the processor 2102 and the communication interface 2103 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.21Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0147] Optionally, in a specific implementation, if the memory 2101, the processor 2102 and the communication interface 2103 are integrated on a chip, the memory 2101, the processor 2102 and the communication interface 2103 can communicate with each other through an internal interface.

[0148] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.

[0149] An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0150] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.

[0151] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0152] It should be understood that the above processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.

[0153] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0154] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of exemplary but not limiting description, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).

[0155] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0156] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0157] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0158] Any process or method described in the flow chart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0159] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0160] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0161] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0162] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope recorded in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A DEM file processing method, comprising: Get multiple DEM files to be processed; Establishing a primary index for searching a target DEM file and establishing a secondary index for searching data in the target DEM file to realize real-time slicing; wherein the target DEM file is determined according to one or more of the DEM files to be processed; Establish a primary index for finding the target DEM file, including: Determine a root node that includes a geographic coordinate range corresponding to the plurality of DEM files to be processed; Building a quadtree based on the root node, and using the quadtree as the primary index; wherein the leaf nodes of the quadtree correspond one-to-one to the target DEM file; Establish a secondary index for searching the data in the target DEM file, including: Divide the target DEM file into a plurality of logical blocks, and record the block size and block start position of the logical blocks; Determine the index number of the logic block, and determine a logic block index table according to the block size, the block start position and the index number; The logic block index table is used as the secondary index.

2. The method according to claim 1, wherein: Constructing a quadtree based on the root node, including: The root node is split multiple times until the pixel value corresponding to the current split result is less than a given pixel threshold, and the geographic coordinate range corresponding to the current split result is less than a given geographic coordinate threshold; The multiple DEM files to be processed are cut and merged to obtain leaf nodes corresponding to the previous splitting results.

3. The method according to claim 1, wherein: Also includes: In response to receiving an instruction to search for data corresponding to a given geographic coordinate range, a target DEM file to be queried is determined according to the given geographic coordinate range and the primary index, and data in the target DEM file to be queried is acquired according to the secondary index.

4. The method according to claim 3, wherein: Determining the target DEM file to be queried according to the given geographic coordinate range and the primary index includes: Convert the given geographic coordinates to elevation data coordinates. Expanding the elevation data coordinate range along the specified elevation data coordinate direction to obtain an updated elevation data coordinate range; A target DEM file having an intersection with the updated elevation data coordinate range is determined according to the primary index to obtain a target DEM file to be queried.

5. The method according to claim 4, wherein: Acquiring the data in the target DEM file to be queried according to the secondary index includes: According to the secondary index, the data in the target DEM file to be queried, which is within the coordinate range of the elevation data, is obtained.

6. The method according to claim 4, wherein: Also includes: Determine the activated feature points of the current level within the coordinate range of the elevation data; the activated feature points include at least regional feature points and regional vertices; A triangulated network corresponding to the elevation data coordinates is constructed according to the activated feature points.

7. The method according to claim 6, wherein: When there is an area without valid data in the target DEM file to be queried, determining the activated feature points of the current level within the elevation data coordinate range includes: Determine the boundary points of the area without valid data, and use the boundary points as activation feature points of the current level.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

9. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Storage method and reading method for mass tile data

    CN103412962A

  • Massive terrain data multi-dimensional division structure, generation method and fine scene fast generation method

    CN108765564A

  • CIM city information aggregation regulation construction management big data platform construction method

    CN118245025A