Three-dimensional GIS (geographic information system) topographic image visualization intelligent organization management method
By adopting the LOD data model based on linear quadtree algorithm and multi-threaded scheduling algorithm in the three-dimensional GIS system, the three-dimensional terrain data is processed in a layered and blocked manner and accelerated the database, which solves the problems of resource waste and low processing efficiency in the existing technology. By optimizing the organization and management of terrain cracks and terrain tree data, the data processing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411729436.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems such as wasting resources, low processing efficiency, duplication of file search, low single-piece transmission efficiency, terrain cracks, and defects in the terrain tree mechanism in the organization and management of three-dimensional GIS terrain data.
The LOD data model based on linear quadtree algorithm is used to process the DEM and DOM data in a layered and chunk manner, generate LOD tile pyramid data, and accelerate data segmentation and database entry through multi-threaded scheduling algorithm. At the same time, we optimize the terrain crack solutions, use the terrain tree method to organize and manage data, and improve data scheduling efficiency.
It improves the modeling speed and accuracy of the three-dimensional terrain model, improves the efficiency of data entry, reduces user waiting time, improves user experience, and optimizes the display effect of the three-dimensional GIS terrain image.
Smart Images

Figure CN119963750A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method for organizing and managing geographic information terrain data, and in particular to a method for intelligently organizing and managing three-dimensional GIS terrain image visualization, belonging to the technical field of three-dimensional terrain visualization. Background Art
[0002] The 3D GIS system has gradually become an important development direction of GIS with its powerful spatial analysis capabilities and intuitive and real spatial data and spatial relationship representation capabilities. The 3D GIS system has also been rapidly applied to urban planning, civil engineering, mining engineering, environmental protection, road design, agriculture, tourism development, military, disaster prediction and assessment and other fields.
[0003] The 3D GIS system simulates and processes the 2D GIS system to express 3D data. The system usually uses surface data. The rapid development of computer graphics display, photogrammetry and remote sensing technologies has made it possible to quickly obtain spatial information and express it into a 3D landscape system. The development of the 3D GIS system has brought about a qualitative change in people's understanding of the surface. In VR systems involving geographic space, 3D GIS display is an important component. In military applications, it can be used for soldiers to simulate scene training; for the demarcation of land boundaries, the virtual environment can eliminate the differences between the two sides in geographical location; virtual cities can provide the most intuitive expression for urban planning and design; 3D GIS systems play a very important role.
[0004] The problems that need to be solved in the existing 3D GIS terrain data organization and management and the key technical difficulties of this application include:
[0005] (1) How to establish a surface model that can truly reflect the shape of the surface based on existing data sources such as digital elevation data DEM and orthophoto image data DOM by organizing and managing existing data is the fundamental problem of three-dimensional terrain model management. However, according to the data storage method of the existing technology, the two types of data are stored separately, resulting in a huge waste of resources. How to improve the speed and accuracy of modeling. The current terrain image segmentation is to segment and store data independently according to different data resolutions. After one type of data is processed, it is manually switched to the next type of data for segmentation and storage, and this cycle is repeated until all data processing is completed. The existing processing flow has greatly affected the efficiency of terrain segmentation and storage. The workload of the initial processing is large, and multi-scale segmentation requires manual supervision. Sometimes the data preprocessing time is much longer than the data segmentation and storage time, and these preprocessing can be avoided or reduced.
[0006] (2) The performance bottleneck of the existing technology storage process is obvious, and the file (folder) search is repeated. The existing technology search method is: when DOM is stored in the library, all DOM-related folders under the existing target folder are first searched. If it is determined to be a DEM folder, it is skipped. When it is the turn of DEM to be stored in the library, the process is repeated. This is equivalent to traversing all folders twice, and the efficiency is obviously reduced. In addition, the restrictions on the folder names of DOM and DEM storage data are now cancelled, and DOM and DEM files of any level can be placed in a folder for storage. In this case, all storage data (DOM and DEM sum) in the same folder will be traversed twice, which is even more inefficient. The existing technology has low single-chip transmission efficiency. Every time a matching target file is found, the associated storage process is performed, so that the server is often idle, and the utilization rate of resources such as bandwidth is low.
[0007] (3) The existing vertical skirt filling method for terrain cracks is a completely static seam drawing method. Its main limitations include: 1) The seam effect is not ideal: it cannot guarantee a good performance in all places. In areas with large terrain undulations (such as mountainous areas), it is easy to produce vertical terrain mutations. When the terrain refreshes slowly in mountainous terrain, small gaps will occasionally appear. They are not large but large enough to be recognized by the naked eye. 2) The drawing range is limited by the terrain bounding box: including drawing seams regardless of whether there are cracks, especially between adjacent plots at the same level, which reduces the drawing efficiency to a certain extent; it is impossible to use the terrain boundary as the target range, which means that the gap filling drawing is performed within the bounding box regardless of whether the terrain data is valid. After adding the judgment before drawing, the visual effect is still not ideal. 3) It is impossible to display underground information (such as pipelines, tunnels, etc.): As shown in the figure below, the terrain is all vertical skirts. When the terrain is set to a certain transparency value or roams underground, it cannot meet the application requirements of underground information.
[0008] (4) The defects of the terrain tree mechanism in the prior art are as follows: 1) Downloading terrain tree information: The current interface for downloading terrain tree information is based on layers. When the database exceeds a certain size, the size of some layers of information will exceed the transmission size limit on the server side, resulting in incomplete terrain tree information and incorrect terrain scheduling. 2) Initialization loading of terrain tree: The generation and loading of the terrain tree into memory are performed before the terrain traversal begins, so there is a waiting time between the terrain preloading the top layer and the refresh, which leads to poor user experience. 3) The format of the local terrain tree file: Since the terrain tree formats of single- and multi-scale databases are not unified and incompatible with each other, the client often performs special version customized parsing. 4) Update of local terrain tree files: Due to the imperfect local cache mechanism, when the terrain tree file exists in the local cache, the client directly parses it without automatically detecting whether it is incorrect or expired. Summary of the invention
[0009] The fundamental problem of three-dimensional terrain model management is how to establish a surface model that can truly reflect the shape of the surface based on existing data sources such as digital elevation data DEM and orthophoto image data DOM through the organization and management of existing data. How to improve the speed and accuracy of modeling. For massive multi-resolution terrain images, this application uses an LOD data model based on a linear quadtree algorithm to perform layered and block processing on DEM data and DOM data to generate a set of LOD tile pyramid data. The efficiency of segmentation and storage of DEM data and DOM data is accelerated based on a multi-threaded scheduling algorithm. The crack solution is optimized through a variety of means and methods to further improve the display effect of three-dimensional GIS terrain images; the automation of the image mosaic process can generate feathering splicing lines in various image overlapping situations, solving the problem that traditional image mosaic feathering often requires manual feathering radius and manual splicing. Optimize the management and organization of three-dimensional GIS terrain image data, further improve the efficiency of data scheduling, and enhance user experience.
[0010] In order to achieve the above technical effects, the technical solutions adopted in this application are as follows:
[0011] The intelligent organization and management method of 3D GIS terrain image visualization is as follows: first, for massive multi-resolution terrain images, the LOD data model based on the linear quadtree algorithm is used to process DEM data and DOM data in layers and blocks, and a set of LOD tile pyramid data is generated. The multi-threaded scheduling algorithm is used to accelerate the segmentation and storage efficiency of DEM and DOM data; second, the visual triangular cracks formed in the terrain rendering by the quadtree-based LOD algorithm are analyzed, the crack solution is optimized, and the display effect of 3D GIS terrain images is improved; the image mosaic process is automated, and feathering stitching lines are generated in various image overlap situations, solving the problem that the feathering of traditional image mosaics requires manual assignment of feathering radius and manual stitching, adapting to the automatic generation of feathering stitching lines of various images, and automatically calculating the reasonable feathering radius; third, the management and organization method of 3D GIS terrain image data is optimized, and the terrain tree method is used for organization and management;
[0012] A- Terrain image segmentation and storage optimization: 1) DOM and DEM are stored in order to increase the parallel threads of transmission; 2) DOM and DEM threads are started at the same time to reduce the parallel threads of transmission; 3) DOM search and transmission threads are started first, and when the DOM search thread ends, DEM search and transmission threads are started;
[0013] B- Terrain crack optimization processing: 1) When drawing terrain nodes, increase or decrease elevation points in real time; 2) Terrain progressive loading, using mosaic progressive method; 3) Terrain image feathering processing, smooth transition at cracks; 4) Terrain crack repair model: By improving data accuracy, reducing the error of DEM digital elevation, and reducing cracks;
[0014] C- Terrain tree data organization: modify the data scheduling process, access the database before traversing the terrain, write the required bounding box information and index ID into the local xml terrain tree file, and obtain it in real time during scheduling; after the terrain tree is built locally, no longer access the database in real time to obtain tile information; use the terrain tree method for organization and management. When the platform performs scene scheduling management, it generates a terrain tree, which numbers the terrain tiles and records the location information of each tile, as well as the organizational relationship between tiles in the entire scene. The spatial position of each terrain tile can be quickly obtained through the scene tree, without the need to parse the terrain tiles to obtain their positions, effectively improving efficiency when scheduling 3D GIS data.
[0015] Preferably, the data management organization structure is as follows: a pyramid structure is established according to a quadtree, and DEM and DOM are divided into small blocks of 512×512 in a one-to-one manner to facilitate storage and scheduling. Remote sensing image files are divided using GDAL, and a single large file is read in blocks according to the geographic range.
[0016] Preferably, the terrain image cutting process is as follows: different resolutions are placed in different folders, and manual supervision is required during the segmentation. The following three solutions are adopted:
[0017] Solution 1: Place all images in one folder for processing: The organization of DEM and DOM folders remains unchanged, but DOMs of all resolutions are placed in the same folder. The program processes the bounding boxes and classifies the resolutions of DOM files.
[0018] Solution 2: Introduce project files to unify the management of images in different folders: Introduce the concept of project, establish a project tree, and manage all related information in the scene;
[0019] Solution 3: Introduce a task list, keep the original multiple folders unchanged, but the program automatically processes them in the order of the list: keep the existing mode unchanged, just automatically divide and store images of different resolutions in the form of a task queue. Between each task, the program only needs to automatically copy the control file.
[0020] Preferably, the adaptive introduction of multi-threading: breaking the existing multi-scale processing flow and pyramid organization mode, any image with acceptable resolution can be classified into a corresponding pyramid Level, and its associated parameter information is determined immediately, which is only associated with its own resolution, and has nothing to do with the resolution and bounding box of the previous level. Multi-threading combines multi-resolution terrain parallel segmentation, multi-file parallel segmentation, range or tile parallel segmentation and storage;
[0021] The relationship between segmentation and storage: combined with breakpoint resumption, if segmentation is performed before storage, the progress information needs to be saved locally; if segmentation and storage are performed simultaneously, the progress information is saved in the database; if combined with multi-threading, the progress information of different block segmentations is recorded.
[0022] Preferably, the multi-threaded storage solution:
[0023] 1) DOM and DEM storage thread: The segmentation and storage of terrain are separated into independent threads. Similar to the segmentation thread, the DOM and DEM storage are also two independent threads with the same process. DEM has an additional step of calculating the bounding box and storing the bounding box information together.
[0024] 2) File search thread: add a file search thread; search for DOM and DEM tile files in sequence according to the new folder organization method of the segmentation process to avoid repeated traversal; add a container for storing DOM and DEM tile paths, and store the file path in the container continuously after the thread is started. After the search is completed, the thread will be automatically destroyed;
[0025] 3) Terrain tree storage: After the DEM storage thread is finished, according to the original terrain tree storage method, obtain the bounding box information in the DEM table, create a terrain tree file, and update the storage;
[0026] 4) Replenishment mechanism: Replenishment is performed on the server side. If tile storage fails, the cache file is written on the server and the failure is returned to the client. Before the client finishes storing the tile, it determines whether replenishment is needed. If necessary, a replenishment request is sent to the server.
[0027] Preferably, terrain optimization seams: The fundamental reason for the cracks in the LOD-based pyramid algorithm is the difference in the number of adjacent elevation points of adjacent plots of different levels. There are two fundamental solutions:
[0028] Solution 1: Add extra elevation points to the low-level plot on the right, which is equivalent to improving the accuracy of the low-level plot boundary: one elevation point corresponds to an additional triangle surface, which will change the drawing list structure;
[0029] Solution 2: When drawing the high-level plot on the left, skip the extra elevation points, which is equivalent to reducing the accuracy of the high-level plot boundary: Compared with Solution 1, the drawing amount is not increased;
[0030] Method 1: Use solution 1 to add elevation points in real time when drawing terrain nodes:
[0031] 1) Before drawing the current plot, compare it with the levels of the four surrounding plots one by one, mark whether it is necessary to add corresponding elevation points, and judge RightPatch, UpperPatch and LowerPatch one by one;
[0032] 2) Find the location of the added elevation point: the level difference between two adjacent plots does not exceed 1. Adding elevation points means traversing the two adjacent points of the original boundary and adding midpoints in sequence;
[0033] 3) Drawing of additional elevation points: adding them to the set of original elevation points of the plot for unified drawing, or drawing them separately after the original elevation points are drawn;
[0034] Method 2: Using Scheme 2, compared with Scheme 1, when drawing terrain nodes, reduce elevation points in real time:
[0035] 1) Before drawing the current plot, compare it with the levels of the four surrounding plots one by one, mark whether it is necessary to add corresponding elevation points, and judge RightPatch, UpperPatch and LowerPatch one by one;
[0036] 2) Find the location of the added elevation point: the level difference between two adjacent plots does not exceed 1. Adding elevation points means traversing the two adjacent points of the original boundary and adding midpoints in sequence;
[0037] 3) Skip the drawing of elevation points: When drawing, if the loop variable satisfies the characteristic value of the elevation point position, then skip the point and do not draw it;
[0038] Method 3: Double static LOD, using the idea of solution 1 to add elevation points, establishing separate LOD levels for the four sides of the plot in preprocessing, separating the middle and border of the terrain block, and dividing it into 5 independent parts. The middle part does not participate in seam processing, and pre-calculates the vertex index table of the middle mesh for drawing. The triangle strips of the four border parts need to pre-build an index table for all possible link vertices for query;
[0039] When the target terrain block is adjacent to terrain blocks of different detail levels on a certain boundary, a triangle strip with the same level as the adjacent blocks is selected as the boundary to combine and realize the seam.
[0040] Preferably, terrain progressive loading: based on the mosaic progressive method, the pixel value of the original image is replaced with a pixel block consisting of n*n pixels, that is, the resolution is reduced and then enlarged to the original image size, and the image is blurred. In order to simplify the pixel value calculation result, the pixel value of the upper left corner of each pixel block can be taken as the average value to simplify the pixel value calculation result;
[0041] When loading a target image with large image jumps, first load the processed target layers in order from strong to weak mosaic effects, layer by layer, until the original target image is loaded.
[0042] Preferably, the terrain image is feathered: the image with large image jump is subjected to edge blurring processing, that is, the target image and the upper layer low-precision image are transparently superimposed on the boundary;
[0043] The terrain boundary feathering process is divided into static feathering and dynamic feathering according to the execution order. Static feathering is the feathering preprocessing performed when segmenting and storing, and dynamic feathering is the feathering processing completed when the terrain is drawn in real time. If the terrain tile supports transparent channels, the feathering processing is simple, and only the transparency on the image boundary needs to be gradually processed. The 3DVP tile format does not support transparent channels, and the feathering processing requires the pixel values of the high and low resolution images to be merged according to the feathering rules.
[0044] Preferably, the terrain crack repair model:
[0045] 1) Segmentation modification: Change the DEM saving format to double type to avoid loss of accuracy;
[0046] 2) Coordinate amplification and offset: DEM data is stored in double type, and OpenGL only supports float type coordinates. When loading data, DEM pixel coordinates are processed in two steps:
[0047] Step 1: Coordinate enlargement: reduce the decimal places to avoid the loss of decimal precision;
[0048] Step 2: Coordinate offset: After the coordinate is enlarged, a larger coordinate value will be obtained, which is not conducive to OpenGL drawing, calculation, and anti-shake. A certain offset is performed on the basis of the enlarged coordinate to obtain a relatively small coordinate value, ensuring that the coordinate value can be converted back at any time while avoiding the appearance of large coordinates.
[0049] Preferably, the terrain tree optimizes the organization of:
[0050] 1) Simplify the terrain tree structure: simplify the 6 values of the bounding box information, retain only 2 height values, and the remaining 4 coordinate values are obtained through real-time calculation;
[0051] 2) Process optimization: 1- Get child nodes: Calculate BoundingBox uses MetaData value as the starting point, calculates the plane coordinates of the bounding box of each node according to PlotLocation (Layer, Col, Row), and adds the maximum and minimum heights read from the terrain tree file to obtain the required bounding box information; 2- Get the height of the bounding box: Change the original method of directly obtaining the 6 coordinate values of the bounding box from the terrain tree file to obtaining the maximum and minimum 2 height values, saving float*4 space for each tile;
[0052] 3) Terrain tree thread creation and destruction: Create a terrain tree thread and start it before the terrain traversal starts. Create a terrain tree file from the top in the order of the first traversal. In this way, after one layer of terrain tree is built, the terrain can be refreshed one layer below. The number of tiles in the first few layers is small and the time required is short.
[0053] Compared with the prior art, the innovations and advantages of this application are:
[0054] (1) This application is based on 3DGIS technology, supported by geographic environment data such as digital elevation data (DEM) and orthophoto image data (DOM), to study the construction technology of multi-scale three-dimensional terrain scenes, and optimize the visualization expression method of three-dimensional terrain information. It focuses on key technologies such as three-dimensional large-scale terrain visualization, dynamic update of three-dimensional scenes, and three-dimensional terrain interaction, and proposes corresponding solutions and methods. First, optimize the DOM, DEM segmentation and storage scheme of three-dimensional GIS terrain image data, effectively improve the efficiency of DOM, DEM segmentation and storage; second, due to the visual triangular cracks (including different resolutions) formed in the terrain rendering based on the quadtree LOD algorithm, the crack solution is optimized through a variety of means and methods to further improve the display effect of three-dimensional GIS terrain images; third, optimize the organization and management scheme of three-dimensional GIS terrain image data, effectively improve the efficiency in data scheduling, greatly reduce user waiting time, and further improve user experience.
[0055] (2) The key technical optimization and innovation points of the three-dimensional GIS terrain image visualization in this application to improve data processing efficiency, solve the problem of terrain cracks, and increase the speed of data scheduling include: First, the method for improving the efficiency of terrain image segmentation and storage, which adopts multi-threading technology. If multi-threading technology is not adopted, the terrain image DEM and DOM data are segmented and stored separately. After the DEM data is segmented and stored, the DOM is segmented and stored. When multi-threading is adopted, the DEM and DOM can be segmented and stored at the same time, and the efficiency of data processing can be greatly improved. Second, the terrain crack solution improves the display effect. 1) When drawing terrain nodes, the elevation points are added (reduced) in real time to fundamentally solve the problem of terrain cracks; 2) Terrain progressive loading, using mosaic or transparent progressive methods, improves the display effect of three-dimensional GIS data. 3) The terrain image feathering process is adopted to make the abrupt parts after the crack processing can be smoothly transitioned; 4) The terrain crack repair model reduces the error of DEM digital elevation by improving data accuracy, thereby minimizing the crack problem. The third is to use the terrain tree method for organization and management. The spatial position of each terrain tile can be quickly obtained through the scene tree, without the need to parse the terrain tiles to obtain their positions, thereby effectively improving efficiency when scheduling three-dimensional GIS data.
[0056] (3) This application improves the efficiency of segmentation and storage of terrain and images: a quadtree structure is used to organize digital elevation data (DEM) and orthophoto image data (DOM) when building pyramids, multi-thread segmentation is introduced, a multi-thread segmentation solution is designed and implemented, and the problem of manual supervision is effectively solved. This application solves the key technology of visual cracks: due to the progressive loading of terrain in the terrain rendering based on the quadtree LOD algorithm, visual triangular cracks are formed. It is proposed to increase (reduce) elevation points in real time when drawing terrain nodes; the terrain is progressively loaded, using a mosaic progressive method; the terrain image is feathered, and the cracks are smoothly transitioned; a terrain crack repair model is used to improve data accuracy and reduce the error of DEM digital elevation, thereby reducing crack problems, improving the display effect of three-dimensional GIS data, and improving the user's visual experience. An optimized data organization and management solution has been established: the terrain tree method is used for organization and management. When the platform performs scene scheduling management, a terrain tree is generated. The terrain tree numbers the terrain tiles and records the location information of each tile and the organizational relationship between tiles in the entire scene. The spatial position of each terrain tile can be quickly obtained through the scene tree, thereby effectively improving efficiency in data scheduling, reducing user waiting time, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is the algorithm flow chart of batch warehousing scheme.
[0058] Figure 2 This is a diagram of the new folder organization method for the file search thread.
[0059] Figure 3 It is a multi-threaded warehousing flowchart.
[0060] Figure 4 This is a schematic diagram of triangular cracks formed by unequal triangular mesh construction.
[0061] Figure 5 This is a schematic diagram of artificial terrain cracks.
[0062] Figure 6 This is the schematic diagram of adding elevation points to terrain seams.
[0063] Figure 7 This is a flow chart of the two loading mechanisms of terrain progressive loading.
[0064] Figure 8 It is a schematic diagram of the terrain static feathering process.
[0065] Fig. 9 This is a picture of the dynamic feathering effect of the terrain.
[0066] Fig.10 This is a schematic diagram of the SearchTerrainChild improvements.
[0067] Fig.11 It is a flowchart for obtaining the height of the bounding box of the child node.
[0068] Fig.12 It is to obtain the thread creation and destruction flow chart of the child node terrain tree. DETAILED DESCRIPTION
[0069] The following, in conjunction with the accompanying drawings, further describes the technical solution of the three-dimensional GIS terrain image visualization intelligent organization and management method provided by the present application, so that technical personnel in the field can better understand the present application and implement it.
[0070] How to establish a surface model that can truly reflect the shape of the earth's surface based on existing data sources such as digital elevation data DEM and orthophoto image data DOM through the organization and management of existing data is the fundamental problem of 3D terrain model management. How to improve the speed and accuracy of modeling. With the development of computer software and hardware, people have higher and higher requirements for the realistic effect of 3D terrain visualization, and the realism of 3D terrain is becoming more and more important in terrain visualization.
[0071] 1) For massive multi-resolution terrain images, the LOD data model based on the linear quadtree algorithm is used to perform layered and block processing on the DEM data and DOM data to generate a set of LOD tile pyramid data. The multi-threaded scheduling algorithm is used to accelerate the efficiency of segmentation and storage of DEM data and DOM data.
[0072] 2) Due to the visual triangular cracks (including different resolutions) formed in the terrain rendering by the quadtree-based LOD algorithm. Through a variety of means and methods to optimize the crack solution, the display effect of the three-dimensional GIS terrain image is further improved; the automation of the image mosaic process can generate feathering stitching lines in various image overlap situations, solving the problem that traditional image mosaic feathering often requires manual feathering radius and manual stitching. The algorithm is simple and efficient, adapting to the automatic generation of feathering stitching lines for various images, and automatically calculating a reasonable feathering radius. The whole process does not require manual intervention, solving a key step in the automation of the image mosaic process.
[0073] 3) Optimize the management and organization of 3D GIS terrain image data, further improve the efficiency of data scheduling, and enhance user experience.
[0074] 1. Terrain Image Segmentation and Storage Optimization
[0075] The constituent elements of three-dimensional GIS data include DEM and DOM. According to the data storage method of the existing technology, the two types of data are stored separately, resulting in a huge waste of resources. This application makes full use of DEM and DOM to design and implement the three-dimensional visualization expression of data, and establishes the data organization structure, DOM, and DEM segmentation and storage plan in the process of realizing the three-dimensional visualization expression of data.
[0076] 1. Data management organizational structure
[0077] A pyramid structure is established according to the quadtree, and DEM and DOM are divided into small blocks of 512×512 in a one-to-one manner to facilitate storage and scheduling. Remote sensing image files are segmented using GDAL, and single large files are read in blocks according to the geographic range.
[0078] 2. Terrain image cutting optimization
[0079] 1. Terrain image cutting process
[0080] The current terrain image segmentation is to segment and store the data independently according to the different resolutions of the data. After one type of data is processed, the next type of data is manually switched to segment and store it, and this cycle is repeated until all data processing is completed. The existing processing flow has greatly affected the efficiency of terrain segmentation and storage. The workload of the initial processing is large, and multi-scale segmentation requires manual supervision. Sometimes the data preprocessing time is much longer than the data segmentation and storage time, and these preprocessing can be avoided or reduced.
[0081] Different resolutions are placed in different folders, and manual supervision is required during the segmentation. This application adopts the following three solutions.
[0082] Solution 1: Place all images in one folder for processing: The organization of DEM and DOM folders remains unchanged, but DOMs of all resolutions are placed in the same folder. The program processes bounding boxes and classifies the resolutions of DOM files.
[0083] Solution 2: Introduce project files to unify the management of images in different folders: Introduce the concept of project, establish a project tree, and manage all related information in the scene (including terrain, models, etc.).
[0084] Solution 3: Introduce a task list, keep the original multiple folders unchanged, but the program automatically processes them in the order of the list: keep the existing mode unchanged, just automatically divide and store images of different resolutions in the form of a task queue. Between each task, the program only needs to automatically copy the control file.
[0085] 2. Adaptive introduction of multithreading
[0086] Breaking the existing multi-scale processing flow and pyramid organization, any image with acceptable resolution can be classified into a corresponding pyramid Level, and its associated parameter information is determined immediately, which is only related to its own resolution, and has nothing to do with the resolution and bounding box of the previous level. Multi-threaded adaptive introduction sets the following levels:
[0087] Level 1: Multi-threaded processing at different resolution levels;
[0088] Level 2: Use different threads for processing at each terrain file level;
[0089] Level 3: Thread processing is used in different area ranges;
[0090] Level 4: Multithreading at the tile level.
[0091] Multi-threaded joint multi-resolution terrain parallel segmentation, multi-file parallel segmentation, range or tile parallel segmentation storage.
[0092] 3. The relationship between segmentation and warehousing
[0093] Combined with breakpoint resume, if you split the data before storing it, you need to save the progress information locally; if you split the data while storing it, the progress information is saved in the database;
[0094] If combined with multithreading, it involves recording the progress information of different block divisions.
[0095] (III) Optimization of the storage mechanism
[0096] The overall process of 3D GIS data storage is as follows: Figure 2 .7. The storage process is as follows: DOM first, then DEM, and finally other table information. Compared with DOM storage, DEM has an additional step of calculating bounding box information before storage.
[0097] 1. Analysis of performance bottlenecks in the warehousing process
[0098] Duplicate file (folder) search. The existing search method is: when DOM is stored in the library, all DOM-related folders under the existing target folder are first searched, and if it is a DEM folder, it is skipped. When it is the turn of DEM to be stored in the library, the process is repeated. This is equivalent to traversing all folders twice, which obviously reduces the efficiency.
[0099] In addition, the folder name restriction for DOM and DEM data storage has been removed, so that all DOM and DEM files at any level can be stored in one folder. In this case, all the stored data (DOM and DEM sum) in the same folder will be traversed twice, which is less efficient.
[0100] The efficiency of single-chip transmission is low. Every time a matching target file is found, it is associated and stored in the database. As a result, the server is often idle, and the utilization rate of resources such as bandwidth is low. Therefore, it is urgent to upgrade to batch storage and multi-thread storage.
[0101] 2. Batch warehousing plan
[0102] The process is as follows Figure 1 As shown in the figure, each single file transferred is changed into a container, the number of files stored in it is controlled by parameters, and the container memory is cleared after each transfer is returned.
[0103] (IV) Multi-threaded warehousing solution
[0104] 1. DOM and DEM storage thread
[0105] The segmentation and storage of terrain are separated into independent threads. Similar to the segmentation thread, the storage of DOM and DEM is also separated into two independent threads with the same process. DEM has an additional step of calculating the bounding box and storing the bounding box information together.
[0106] 2. Find file threads
[0107] Added file search thread, new folder organization method is as follows Figure 2 shown.
[0108] According to the new folder organization method of the segmentation process, search for DOM and DEM tile files in turn to avoid repeated traversal;
[0109] Add a container for storing DOM and DEM tile paths. After the thread is started, the file path is continuously stored in the container. After the search is completed, the thread is automatically destroyed.
[0110] The main idea of the multi-threaded warehousing process is as follows Figure 3 shown.
[0111] 3. Terrain tree storage
[0112] After the DEM storage thread ends, use the original terrain tree storage method to obtain the bounding box information in the DEM table, create a terrain tree file, and update the storage.
[0113] 4. Replenishment Mechanism
[0114] Do the replenishment on the server side. If the tile fails to be loaded into the database, the cache file is written on the server and the failure is returned to the client. Before the client finishes loading the database, it determines whether the replenishment is needed. If necessary, a replenishment request is sent to the server.
[0115] 2. Optimization of terrain cracks
[0116] 1. Causes and manifestations of terrain joints
[0117] 1. The root cause of cracks
[0118] In the LOD algorithm based on quadtree to render terrain, when adjacent plots are refreshed to different levels, the number of elevation points on their common edges is different, as shown in the figure below, forming visual triangular cracks. When single-scale 3D GIS data is segmented, the tiles are not tightly overlapped, resulting in missing areas of the triangulated network and linear terrain cracks.
[0119] 2. Different levels of LOD cracks
[0120] When adjacent terrain tiles have different resolutions, T-shaped nodes are generated, and cracks appear. Due to different data accuracy, multi-scale 3D GIS data has different numbers of elevation points on the common edges, and the triangular mesh construction is not symmetrical, resulting in triangular cracks. Figure 4 As shown in the figure. Due to the terrain LOD used by the platform, this type of crack is basically unavoidable. The T-node crack problem has been solved by the vertical skirt method.
[0121] Draw vertical skirts at the four boundaries of the tile: southeast, northwest, and northeast. The height of the skirt is the height difference between the minimum elevation of the tile and the elevation of the point. The texture coordinates use the texture coordinates of the boundary points.
[0122] 3. Cracks generated by LOD on the same layer
[0123] Terrain seams appear at the borders of adjacent tiles on the same layer. There are two forms of terrain cracks generated by the same layer LOD, and the corresponding causes are also different.
[0124] 1) Vertical cracks at the joints of adjacent tiles on the same layer
[0125] That is, there is no seam in the horizontal direction, but there is a difference in the elevation value of the border joint points of adjacent tiles, resulting in a gap. However, this gap is not visually obvious and can only be observed at a relatively flat viewing angle and in areas with large terrain undulations.
[0126] The reason for this is that when the DEM data is segmented, different tiles are subjected to a certain degree of difference processing. The current terrain segmentation tools (including new and old segmentation tools) use a bilinear difference algorithm. A pixel point needs to refer to the elevation values of adjacent pixels in the X and Y directions and add a certain weight to obtain it. At the same time, due to memory limitations, it is impossible to load all data into the memory, so there will be a lack of pixel points in one direction at the boundary to participate in the difference. The same pixel point on the boundary will have different elevation values at the difference point on different tiles, resulting in cracks.
[0127] The solution to this crack can be avoided by performing edge processing on DEM tiles during digital terrain segmentation.
[0128] 2) Horizontal cracks at the joints of adjacent tiles on the same layer
[0129] According to the traditional image processing principle, adjacent tiles will be redundant to the adjacent image at a certain distance to achieve fusion. Therefore, when the segmented data is displayed through other GIS software (GM or ArcGIS), no cracks can be observed. However, when browsing in the 3dvp system, horizontal cracks will be generated due to the drawing algorithm.
[0130] 3) Cracks
[0131] At LOD 0 level, the cracks are very obvious. Cracks will appear in both the X and Y directions, but the cracks in the Y direction (i.e. the north-south direction) are more obvious. The horizontal cracks are caused by the problem of triangle mesh drawing. The triangle meshes of adjacent tiles are not correctly connected.
[0132] 4. Artificial terrain cracks
[0133] The generation of cracks in artificial terrain is due to the inconsistency between the single-scale terrain interpolation algorithm and the multi-scale algorithm, including the difference in resolution between layers and the elevation point interpolation algorithm, which makes it impossible for artificial terrain to be combined with multi-scale terrain; in addition, since artificial terrain is stored in the database as a model and does not have LOD, cracks will inevitably occur in theory. Figure 5 shown.
[0134] Such cracks are caused by the inconsistency between the single-scale terrain interpolation algorithm and the multi-scale algorithm, including the difference in resolution between layers and the elevation point interpolation algorithm, which makes it impossible for the artificial terrain to be combined with the multi-scale terrain. In addition, since the artificial terrain is stored in the database as a model and does not have LOD, cracks will inevitably occur in theory.
[0135] This problem can be solved by unifying terrain segmentation into multi-scale or global multi-resolution segmentation methods, and considering LOD for artificial terrain.
[0136] (II) Solutions to existing terrain cracks
[0137] 1. Solutions from existing technologies
[0138] The existing technology uses a static vertical skirt filling method, that is, a vertical plane of a certain height is drawn downward between adjacent terrain blocks to cover the cracks. The advantage of this method is that it does not affect the data structure. Although the drawing may be repeated at the boundaries of adjacent grid blocks, the data volume is small and the overall drawing efficiency is still high.
[0139] There are also cracks with similar vertical height differences between two plots at the same level, which are solved by vertical skirts. The apparent reason for this crack is that the corresponding plots are flat, and the skirt depth is equivalent to the elevation of the plots. The visual effect is equivalent to not repairing the leak, and the depth of the vertical skirt can be increased.
[0140] 2. Main processes of the existing mechanism
[0141] 1) Get and judge whether to enable leak patching: Since there is no single-scale or multi-scale type identification in the current database terrain table, the method of reading the configuration file for judgment is temporarily adopted. The configuration file lists the multi-scale database library names. Each time the database is connected, it is first determined whether the target library is a known multi-scale library, and whether to enable leak patching is passed in before the terrain is initialized and preloaded. This method is a temporary solution before the database table structure is optimized.
[0142] 2) Leakage filling drawing: When the terrain traversal thread is started, the corresponding terrain node drawing function is called in the drawing function according to the Boolean value of whether the leak filling is turned on.
[0143] The terrain node class TerrainPlotEx draws the terrain bounding box as a unit. After traversing and drawing all the elevation points of the node, it then traverses all the elevation points in the 0th row, 0th column, last row, and last column. If it is a valid value, draw a vertical skirt. The depth value of the skirt is obtained by traversing the elevation points in the node before drawing the node and taking the minimum value.
[0144] 3) Improved terrain rendering: Before the introduction of multi-scale terrain images, all terrains (images) in a single-scale library were interpolated from the same underlying DEM (DOM), and the underlying data source was complete and there were fewer splicing issues, so image mutations were less likely to occur, and the terrain refresh was within an acceptable visual range.
[0145] In multi-scale terrain images, the GIS content of images with different precisions can vary greatly. Even if they are interpolated upward to the same precision, the richness of pixels still varies greatly. Directly loading the image when refreshing the terrain will be abrupt and lack smooth transitions.
[0146] 3. Problems with the existing mechanism
[0147] The vertical skirt filling method is a completely static seam drawing method with the following main limitations:
[0148] 1) The seam effect is not ideal: it is impossible to maintain a good performance in all places. In areas with large terrain fluctuations (such as mountainous areas), it is easy to produce vertical terrain mutations. When the terrain refreshes slowly in mountainous terrain, small gaps will occasionally appear, which are not large but large enough to be recognized by the naked eye.
[0149] 2) The drawing range is limited by the terrain bounding box: including drawing seams regardless of whether there are cracks, especially between adjacent plots at the same level, which reduces the drawing efficiency to a certain extent; the terrain boundary cannot be used as the target range, which means that gap filling drawing is performed within the bounding box regardless of whether the terrain data is valid. After adding judgment before drawing, the visual effect is still not ideal.
[0150] 3) It is impossible to display underground information (such as pipelines, tunnels, etc.): As shown in the figure below, the terrain was all vertical skirts. When the terrain is set to a certain transparency value or roams underground, it cannot meet the application requirements of underground information.
[0151] 3. Topographic crack optimization scheme
[0152] 1. Terrain optimization seams
[0153] The fundamental reason for the cracks in the LOD-based pyramid algorithm is the difference in the number of adjacent elevation points of plots at different levels. There are two main solutions to fundamentally solve this problem:
[0154] Solution 1: Add extra elevation points to the low-level plot on the right, which is equivalent to improving the accuracy of the low-level plot boundary: one elevation point corresponds to an additional triangle surface, which will change the drawing list structure. The principle of adding elevation points is as follows Figure 6 As shown;
[0155] Solution 2: When drawing the high-level plot on the left, skip the extra elevation points, which is equivalent to reducing the accuracy of the high-level plot boundary: Compared with Solution 1, the drawing amount is not increased;
[0156] Method 1: Use solution 1 to add elevation points in real time when drawing terrain nodes:
[0157] 1) Before drawing the current plot, compare it with the levels of the four surrounding plots one by one to mark whether the corresponding elevation points need to be added. The pseudo code is as follows:
[0158] if(LeftPatch.Layer<=CurrentPatch.Layer)
[0159] LeftPatchFlag = true; / / true means normal drawing
[0160] else
[0161] LeftPatchFlag = false;
[0162] Similarly, judge RightPatch, UpperPatch and LowerPatch one by one;
[0163] 2) Find the location of the added elevation point: the level difference between two adjacent plots does not exceed 1. Adding elevation points means traversing the two adjacent points of the original boundary and adding midpoints in sequence;
[0164] 3) Drawing of additional elevation points: Add them to the set of original elevation points of the plot for unified drawing, or wait until the original elevation points are drawn and then draw them separately.
[0165] Method 2: Using Scheme 2, compared with Scheme 1, when drawing terrain nodes, reduce elevation points in real time:
[0166] 1) Before drawing the current plot, compare it with the levels of the four surrounding plots one by one to mark whether the corresponding elevation points need to be added. The pseudo code is as follows:
[0167] if(LeftPatch.Layer<=CurrentPatch.Layer)
[0168] LeftPatchFlag = true; / / true means normal drawing
[0169] else
[0170] LeftPatchFlag = false;
[0171] Similarly, judge RightPatch, UpperPatch and LowerPatch one by one;
[0172] 2) Find the location of the added elevation point: the level difference between two adjacent plots does not exceed 1. Adding elevation points means traversing the two adjacent points of the original boundary and adding midpoints in sequence;
[0173] 3) Skip drawing of elevation points: When drawing, if the loop variable satisfies the characteristic value of the elevation point position, skip the point and do not draw it.
[0174] Method 3: Double static LOD, using the idea of solution 1 to add elevation points, establishing separate LOD levels for the four sides of the plot in preprocessing, separating the middle and border of the terrain block, and dividing it into 5 independent parts. The middle part does not participate in seam processing, and pre-calculates the vertex index table of the middle mesh for drawing. The triangle strips of the four border parts need to pre-build an index table for all possible link vertices for query;
[0175] When the target terrain block is adjacent to terrain blocks of different detail levels on a certain boundary, a triangle strip with the same level as the adjacent blocks is selected as the boundary to combine and realize the seam.
[0176] 2. Terrain progressive loading
[0177] Based on the mosaic progressive method, the pixel value of the original image is replaced with a pixel block composed of n*n pixels, that is, the resolution is reduced and then enlarged to the original image size to blur the image. In order to simplify the pixel value calculation result, the pixel value of the upper left corner of each pixel block is taken as the average to simplify the pixel value calculation result;
[0178] When loading a target image with a large image jump, first load the processed target layers in order from strong to weak mosaic effects, and then load them layer by layer until the original target image is loaded. Figure 7 shown.
[0179] 3. Terrain image feathering
[0180] Multi-resolution images come from different sources, and often have differences in color, brightness, and other aspects. Not only will the image display appear abrupt when the terrain is refreshed, but it will also cause a lack of transition between high-precision images and low-precision images, making the boundary appear abrupt and unnatural. For this situation, the terrain drawing mechanism in the existing technology lacks the corresponding processing link, and the boundary can be feathered.
[0181] The terrain boundary feathering of the present application is to perform edge blurring processing on an image with a large image jump, that is, a transparent superposition of the target image and the previous layer of low-precision image on the boundary.
[0182] The shadow area is the intersection and overlap area of Figures A and B, that is, the feathering target area. The feathering radius is r, with its center line x=x1 as the axis. The closer to the axis, the larger the alpha value. The RGB three-component values of the pixel after feathering are the sum of the products of the original pixel values and the alpha value on Figures A and B corresponding to the location.
[0183] The terrain boundary feathering process is divided into static feathering and dynamic feathering according to the execution order. Static feathering is the feathering preprocessing performed when segmenting and storing, and dynamic feathering is the feathering processing completed when the terrain is drawn in real time. If the terrain tile supports transparent channels, the feathering processing is simple, and only the transparency on the image boundary needs to be gradually processed. The 3DVP tile format does not support transparent channels, and the feathering processing requires the pixel values of the high and low resolution images to be merged according to the feathering rules.
[0184] 1) Static feathering process such as Figure 8 shown.
[0185] 2) Dynamic feathering process: The overall process is consistent with static feathering. When drawing tiles, two images are superimposed in real time to determine whether the target image needs to open the boundary feathering process. It is necessary to add an identification field in the terrain image table structure. The processing effect is as follows Fig. 9 shown.
[0186] 4. Terrain crack repair model
[0187] 1) Segmentation modification: Change the DEM saving format to double type to avoid loss of accuracy;
[0188] 2) Coordinate amplification and offset: DEM data is stored in double type, and OpenGL only supports float type coordinates. When loading data, DEM pixel coordinates are processed in two steps:
[0189] Step 1: Coordinate enlargement: reduce the decimal places to avoid the loss of decimal precision;
[0190] Step 2: Coordinate offset: After the coordinate is enlarged, a larger coordinate value will be obtained, which is not conducive to OpenGL drawing, calculation, and anti-shake. A certain offset (that is, subtract a certain value) is performed on the basis of the enlarged coordinate to obtain a relatively small coordinate value, ensuring that the coordinate value can be converted back at any time while avoiding the appearance of large coordinates.
[0191] (IV) Optimization of terrain crack treatment plan
[0192] 1. When drawing terrain nodes, increase or decrease elevation points in real time;
[0193] 2. Terrain progressive loading, using mosaic progressive method;
[0194] 3. Feathering processing of terrain images, smooth transition at cracks;
[0195] 4. Terrain crack repair model: By improving data accuracy, reducing the error of DEM digital elevation and reducing crack problems.
[0196] It effectively improves the three-dimensional visualization expression effect of GIS data and further enhances the sensory authenticity of three-dimensional GIS data.
[0197] 3. Terrain Tree Data Organization
[0198] (I) Introducing terrain trees
[0199] When traversing the terrain, before reading the tile into memory, it is necessary to determine whether the tile has a child node, and use the bounding box information to determine whether the tile needs to be loaded (viewing volume clipping, loading distance judgment).
[0200] 2. Principles of the existing mechanism
[0201] 1. Terrain loading process
[0202] Terrain preloading: Before starting the traversal thread, preload the top-level tiles as initialization for terrain display.
[0203] Terrain traversal: After starting the traversal thread, first load the terrain tree, then start traversal (DeleteTerrain is now commented out).
[0204] 2. Terrain tree creation process
[0205] After the terrain traversal thread is started, a terrain tree is created before traversal, and the following four branches are judged in order:
[0206] 1) When the *New.xml file exists in the local cache, it is parsed first;
[0207] 2) There is a *.xml file in the local cache;
[0208] 3) There is no terrain tree file in the local cache, so it is downloaded from the database;
[0209] 4) It is not in the local cache or database and is generated locally on the spot.
[0210] (III) Defects of the existing terrain tree mechanism
[0211] (1) Downloading terrain tree information: Currently, the interface for downloading terrain tree information is based on layers. When the database exceeds a certain size, the size of some layers of information will exceed the transmission size limit on the server side, resulting in incomplete terrain tree information and incorrect terrain scheduling.
[0212] (2) Terrain tree initialization loading: The terrain tree is generated and loaded into memory before the terrain traversal begins. Therefore, there is a waiting time between the time when the terrain is preloaded to the top level and when it can start refreshing, which leads to a poor user experience.
[0213] (3) Format of local terrain tree files: Since the terrain tree formats of single-scale and multi-scale databases are not unified and incompatible with each other, clients often perform special customized parsing.
[0214] (4) Update of local terrain tree files: Due to the imperfect local cache mechanism, when the terrain tree file exists in the local cache, the client directly parses it without automatically checking whether it is incorrect or expired.
[0215] (IV) Terrain tree optimization organization
[0216] 1. Simplify the terrain tree structure
[0217] Simplify the 6 values of the bounding box information, retain only 2 height values, and the remaining 4 coordinate values are obtained through real-time calculation.
[0218] 2. Process Optimization
[0219] 1) Get the child node, such as Fig.10 shown.
[0220] Calculate BoundingBox uses the MetaData value as the starting point, calculates the plane coordinates of the bounding box of each node according to PlotLocation (Layer, Col, Row), and adds the maximum and minimum heights read from the terrain tree file to obtain the required bounding box information.
[0221] 2) Get the bounding box height, such as Fig.11 As shown in the figure, the original method of obtaining the 6 coordinate values of the bounding box directly from the terrain tree file is changed to obtaining the maximum and minimum height values, saving float*4 space for each tile.
[0222] 3. Terrain tree thread creation and destruction
[0223] Create a terrain tree thread and start it before the terrain traversal begins. Fig.12 As shown. Create the terrain tree file from the top according to the first traversal order, so that after building one layer of terrain tree, the terrain can be refreshed one layer below, and the number of tiles in the first few layers is small, so the time required is short.
[0224] The terrain tree data organization optimizes the management and organization of 3D GIS terrain image data, further improving the efficiency of data scheduling, significantly reducing user waiting time, and enhancing user experience.
Claims
1. A method for intelligent organization and management of three-dimensional GIS terrain image visualization, characterized in that: First, for massive multi-resolution terrain images, the LOD data model based on the linear quadtree algorithm is used to process DEM data and DOM data in layers and blocks, generate a set of LOD tile pyramid data, and accelerate the segmentation and storage efficiency of DEM and DOM data based on the multi-threaded scheduling algorithm; second, the visual triangular cracks formed in the terrain rendering by the quadtree-based LOD algorithm are analyzed, the crack solution is optimized, and the display effect of three-dimensional GIS terrain images is improved; the image mosaic process is automated, and feathering stitching lines are generated in various image overlapping situations, solving the problem that the feathering of traditional image mosaics requires manual assignment of feathering radius and manual stitching, adapting to the automatic generation of feathering stitching lines for various images, and automatically calculating the reasonable feathering radius; third, the management and organization of three-dimensional GIS terrain image data is optimized, and the terrain tree method is used for organization and management; A- Terrain image segmentation and storage optimization: 1) DOM and DEM are stored in order to increase the parallel threads of transmission; 2) DOM and DEM threads are started at the same time to reduce the parallel threads of transmission; 3) DOM search and transmission threads are started first, and when the DOM search thread ends, DEM search and transmission threads are started; B- Terrain crack optimization processing: 1) When drawing terrain nodes, increase or decrease elevation points in real time; 2) Terrain progressive loading, using mosaic progressive method; 3) Terrain image feathering processing, smooth transition at cracks; 4) Terrain crack repair model: By improving data accuracy, reducing the error of DEM digital elevation, and reducing cracks; C- Terrain tree data organization: Modify the data scheduling process. Before traversing the terrain, access the database first to write the required bounding box information and index ID into the local XML terrain tree file, and obtain it in real time during scheduling; after the terrain tree is built locally, no longer access the database in real time to obtain tile information; The terrain tree method is used for organization and management. When the platform performs scene scheduling management, a terrain tree is generated. The terrain tree numbers the terrain tiles and records the location information of each tile and the organizational relationship between tiles in the entire scene. The spatial position of each terrain tile can be quickly obtained through the scene tree, without the need to parse the terrain tiles to obtain their positions, which effectively improves efficiency when scheduling 3D GIS data.
2. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Data management organizational structure: A pyramid structure is established according to the quadtree, and DEM and DOM are divided into small blocks of 512×512 in a one-to-one manner to facilitate storage and scheduling. Remote sensing image files are segmented using GDAL, and the reading of a single large file is divided into blocks according to the geographical scope.
3. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Terrain image cutting process: Different resolutions are placed in different folders, and manual supervision is required during the segmentation. The following three solutions are used: Solution 1: Place all images in one folder for processing: The organization of DEM and DOM folders remains unchanged, but DOMs of all resolutions are placed in the same folder. The program processes the bounding boxes and classifies the resolutions of DOM files. Solution 2: Introduce project files to unify the management of images in different folders: Introduce the concept of project, establish a project tree, and manage all related information in the scene; Solution 3: Introduce a task list, keep the original multiple folders unchanged, but the program automatically processes them in the order of the list: keep the existing mode unchanged, just automatically divide and store images of different resolutions in the form of a task queue. Between each task, the program only needs to automatically copy the control file.
4. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Adaptive introduction of multi-threading: breaking the existing multi-scale processing flow and pyramid organization mode, any image with acceptable resolution can be classified into a corresponding pyramid Level, and its associated parameter information is determined immediately, which is only related to its own resolution, and has nothing to do with the resolution and bounding box of the previous level. Multi-threading combines multi-resolution terrain parallel segmentation, multi-file parallel segmentation, range or tile parallel segmentation and storage; The relationship between segmentation and storage: combined with breakpoint resumption, if segmentation is performed before storage, the progress information needs to be saved locally; if segmentation and storage are performed simultaneously, the progress information is saved in the database; if combined with multi-threading, the progress information of different block segmentations is recorded.
5. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Multi-threaded storage solution: 1) DOM and DEM storage thread: The segmentation and storage of terrain are separated into independent threads. Similar to the segmentation thread, the DOM and DEM storage are also two independent threads with the same process. DEM has an additional step of calculating the bounding box and storing the bounding box information together. 2) File search thread: add a file search thread; search for DOM and DEM tile files in sequence according to the new folder organization method of the segmentation process to avoid repeated traversal; add a container for storing DOM and DEM tile paths, and store the file path in the container continuously after the thread is started. After the search is completed, the thread will be automatically destroyed; 3) Terrain tree storage: After the DEM storage thread is finished, according to the original terrain tree storage method, obtain the bounding box information in the DEM table, create a terrain tree file, and update the storage; 4) Replenishment mechanism: Replenishment is performed on the server side. If tile storage fails, the cache file is written on the server and the failure is returned to the client. Before the client finishes storing the tile, it determines whether replenishment is needed. If necessary, a replenishment request is sent to the server.
6. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Terrain optimization seams: The fundamental reason for the cracks in the LOD-based pyramid algorithm is the difference in the number of adjacent elevation points of adjacent plots of different levels. There are two fundamental solutions: Solution 1: Add extra elevation points to the low-level plot on the right, which is equivalent to improving the accuracy of the low-level plot boundary: one elevation point corresponds to an additional triangle surface, which will change the drawing list structure; Solution 2: When drawing the high-level plot on the left, skip the extra elevation points, which is equivalent to reducing the accuracy of the high-level plot boundary: Compared with Solution 1, the drawing amount is not increased; Method 1: Use solution 1 to add elevation points in real time when drawing terrain nodes: 1) Before drawing the current plot, compare it with the levels of the four surrounding plots one by one, mark whether it is necessary to add corresponding elevation points, and judge the RightPatch, UpperPatch and LowerPatch one by one; 2) Find the location of the added elevation point: the level difference between two adjacent plots does not exceed 1. Adding elevation points means traversing the two adjacent points of the original boundary and adding midpoints in sequence; 3) Drawing of additional elevation points: adding them to the set of original elevation points of the plot for unified drawing, or drawing them separately after the original elevation points are drawn; Method 2: Using Scheme 2, compared with Scheme 1, when drawing terrain nodes, reduce elevation points in real time: 1) Before drawing the current plot, compare it with the levels of the four surrounding plots one by one, mark whether it is necessary to add corresponding elevation points, and judge the RightPatch, UpperPatch and LowerPatch one by one; 2) Find the location of the added elevation point: the level difference between two adjacent plots does not exceed 1. Adding elevation points means traversing the two adjacent points of the original boundary and adding midpoints in sequence; 3) Skip the drawing of elevation points: When drawing, if the loop variable satisfies the characteristic value of the elevation point position, then skip the point and do not draw it; Method 3: Double static LOD, using the idea of solution 1 to add elevation points, establishing separate LOD levels for the four sides of the plot in preprocessing, separating the middle and border of the terrain block, and dividing it into 5 independent parts. The middle part does not participate in seam processing, and pre-calculates the vertex index table of the middle mesh for drawing. The triangle strips of the four border parts need to pre-build an index table for all possible link vertices for query; When the target terrain block is adjacent to terrain blocks of different detail levels on a certain boundary, a triangle strip with the same level as the adjacent blocks is selected as the boundary to combine and realize the seam.
7. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Terrain progressive loading: Based on the mosaic progressive method, the pixel value of the original image is replaced with a pixel block consisting of n*n pixels, that is, the resolution is reduced and then enlarged to the original image size, blurring the image. To simplify the pixel value calculation result, the pixel value of the upper left corner of each pixel block is taken as the average to simplify the pixel value calculation result; When loading a target image with large image jumps, first load the processed target layers in order from strong to weak mosaic effects, layer by layer, until the original target image is loaded.
8. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Terrain image feathering: The image with large image jump is processed with edge blurring, that is, the target image and the previous layer of low-precision image are transparently superimposed on the boundary; The terrain boundary feathering process is divided into static feathering and dynamic feathering according to the execution order. Static feathering is the feathering preprocessing performed when segmenting and storing, and dynamic feathering is the feathering processing completed when the terrain is drawn in real time. If the terrain tile supports transparent channels, feathering processing is simple, and only the transparency on the image boundary needs to be gradually processed. The 3DVP tile format does not support transparent channels, and feathering processing requires the pixel values of the high and low resolution images to be merged according to the feathering rules.
9. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Terrain crack repair model: 1) Segmentation modification: Change the DEM saving format to double type to avoid loss of accuracy; 2) Coordinate amplification and offset: DEM data is stored in double type, and OpenGL only supports float type coordinates. When loading data, DEM pixel coordinates are processed in two steps: Step 1: Coordinate enlargement: reduce the decimal places to avoid the loss of decimal precision; Step 2: Coordinate offset: After the coordinate is enlarged, a larger coordinate value will be obtained, which is not conducive to OpenGL drawing, calculation, and anti-shake. A certain offset is performed on the basis of the enlarged coordinate to obtain a relatively small coordinate value, ensuring that the coordinate value can be converted back at any time while avoiding the appearance of large coordinates.
10. The method for intelligent organization and management of three-dimensional GIS terrain image visualization according to claim 1, characterized in that: Terrain tree optimization organization: 1) Simplify the terrain tree structure: simplify the 6 values of the bounding box information, retain only 2 height values, and the remaining 4 coordinate values are obtained through real-time calculation; 2) Process optimization: 1- Get child nodes: Calculate BoundingBox uses MetaData value as the starting point, calculates the plane coordinates of the bounding box of each node according to PlotLocation (Layer, Col, Row), and adds the maximum and minimum heights read from the terrain tree file to obtain the required bounding box information; 2- Get the height of the bounding box: Change the original method of directly obtaining the 6 coordinate values of the bounding box from the terrain tree file to obtaining the maximum and minimum 2 height values, saving float*4 space for each tile; 3) Terrain tree thread creation and destruction: Create a terrain tree thread and start it before the terrain traversal starts. Create a terrain tree file from the top in the order of the first traversal. In this way, after one layer of terrain tree is built, the terrain can be refreshed one layer below. The number of tiles in the first few layers is small and the time required is short.
Citation Information
Patent Citations
Method and system for visualizing multiresolution dynamic landform
CN101976468A
LOD model generation method based on linear quadtree
CN105405166A
Three-dimensional map data processing method based on multiple detailed layers
CN105427380A
WebGL-based three-dimensional GIS technology platform
CN108287929A
Rapid scheduling method and system for terrain image data
CN109064546A