Universal processing method for processing elevation data and generating corresponding three-dimensional terrain based on dem
Through a general processing method based on DEM elevation data, the problems of cumbersome and low accuracy of traditional terrain data processing are solved, and efficient and accurate three-dimensional terrain generation and visualization are achieved, which is suitable for the fields of geographic information systems and computer graphics.
Patent Information
- Application Number
- CN202411106770.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional terrain data processing and generation methods are cumbersome and error-prone, resulting in a decrease in accuracy and visualization of terrain generation, and a lack of three-dimensional terrain visual generation methods based on mainstream game engines.
It provides a general method based on DEM elevation data processing, including preprocessing, reading and parsing, and generating Unity Terrain terrain. By standardizing terrain data, UTM projection, slicing and mapping processing, it realizes automated three-dimensional terrain generation.
It realizes efficient and accurate three-dimensional terrain generation, saves time and human resources, improves terrain data processing efficiency, and provides a visual terrain display solution.
Smart Images

Figure CN118941733A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of geographic information system (GIS) and computer graphics, and in particular to a general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain. Background Art
[0002] In recent years, with the rapid development of geographic information system technology and computer graphics technology, people have an increasing demand for digital elevation model (DEM) data processing and virtual terrain generation. Traditional terrain data processing and generation methods usually require cumbersome software processing and manual processes, which are time-consuming and prone to errors, and the accuracy and visualization effect of terrain generation also decrease.
[0003] Currently, there are DEM terrain scanning or terrain generation methods for the natural sciences, such as DEM terrain extraction methods in geography and geology, but there is no process and method for generating three-dimensional terrain visualization from DEM data based on mainstream game engines. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain, which is characterized by comprising the following steps:
[0005] Step 1: preprocess the dem elevation data to obtain standardized terrain data, where the standardized terrain data refers to terrain data that conforms to standard geographic spatial data specifications, map tile specifications, and raster data specifications;
[0006] Step 2: Read and parse the standardized terrain data to obtain the DEM elevation source data, including reading and parsing the metadata, and store it in the following defined class for subsequent 3D mesh generation:
[0007] The DEM data class specifies three variables, including the width row, height column, and mData[] height data array, which is used to store the parsed elevation metadata.
[0008] The UTM class specifies two variables, including UtmX Mocar projection coordinate X and UtmY Mocar projection coordinate Y. This class is used to store the UTM coordinates of the parcel data.
[0009] Step 3: Generate Unity Terrain and output standardized 3D terrain mesh data, including generating standardized 3D terrain corresponding to .TIF elevation data in Unity. Unity Terrain generation aims to realize data reconstruction and 3D terrain visualization in Unity by reading source data through Unity API.
[0010] Furthermore, the step 1 includes: for .tif terrain data or geographic information data obtained through any data source, first perform step 1.1: determine whether it is a UTM Universal Mercal Projection, if not, adjust the data to the UTM projection for processing, and then enter step 1.2; if it is a UTM projection, directly enter step 1.2, step 1.2 includes: determine whether the resolution size of the data source is a standard format resolution, if the resolution does not conform to the standard map format, use a segmentation tool to segment the terrain, re-cut the resolution of the metadata, and cut it to the standard format size. If the resolution conforms to the standard map format, export it directly, or further subdivide it and then export it by tile segmentation.
[0011] Furthermore, the standardized terrain data adopts a standard geographic spatial reference system, the projection method adopted is UTM projection, the terrain accuracy unit is meter or kilometer, and the resolution is constrained to an integer power of 2.
[0012] Furthermore, in step 2, the Tiff.Open method is used to open the TIFF image file of the specified path, and the image.GetField method is used to obtain the width and height of the image, and they are assigned to the width and height attributes of dem respectively; the image.ScanlineSize method is called to obtain the total number of bytes of a line of data, and a two-layer loop is used to traverse the width and height of the image. In the inner loop, the data obtained by traversing a line is divided into four bytes, that is, four bytes are a single-precision float, so as to obtain all the height data corresponding to each line and store them in mData. From then on, all the width and height indexes and height metadata of the terrain are obtained.
[0013] Furthermore, in step 2, after obtaining all the width and height indexes and height metadata of the terrain, the binding information of the vertex is obtained through TiffTag.GEOTIFF_MODELTIEPOINTTAG, and the btye array with index 1 is taken out, which stores the UTM coordinate information of the binding point; then, the BitConverter.ToDouble method is used to read the UTM coordinate information from it, and the read UTM coordinates are saved in the UTM class. From then on, the UTM coordinate information of the current plot of the terrain is obtained.
[0014] Furthermore, the step 3 includes: step 3.1, height difference correction calculation, calculating the height offset value of each plot relative to the overall data, and finally assigning the offset value to the overall height of its own terrain to achieve seamless splicing between plots; step 3.2, calculating the plot height, and obtaining the actual height of the current plot by absolute value comparison; step 3.3, mapping the plot height array, mapping all height values to the [0, 1] interval, and re-storing them as a height array; step 3.4, calculating the plot position, calculating the lower left corner position coordinates of each plot, and achieving correct and automatic arrangement of the plots according to the coordinate information; step 3.5, calling the Unity terrain API to generate the final plot three-dimensional mesh model.
[0015] Furthermore, the step 3.4 includes: obtaining utmx and utmy in the utm class in step 2, subtracting the utmx value of a certain benchmark starting plot from utmx, and calculating utmy in the same way, and finally obtaining two converted plot coordinates: ConvertedUtmX and ConvertedUtmY.
[0016] Furthermore, the step 3.5 includes: first, defining a new Terrain object and terraindata, assigning all the data obtained by the above calculation to the Terrain,
[0017] Next, get the width from the metadata in step 2 and assign the width value to the heightmapResolutions of Terrain.
[0018] Next, assign the offsetHeight calculated in 3.1 to the world position transform.y of Terrain.
[0019] Next, assign the actual plot height terrainheight calculated in 3.2 to the y value of terrainData.size.
[0020] Next, the remapped height data calculated in 3.3 is assigned to the height of the terrain through the terrainData.SetHeights method.
[0021] Next, assign the ConvertedUtmX and ConvertedUtmY calculated in 3.4 to the Terrain's world transform.x and transform.z.
[0022] Next, add 1 to the width and assign it to Terrain's terrainData.heightmapResolution.
[0023] Next, assign width and terrainheight to Terrain's terrainData.size.
[0024] Next, use the terrain API to complete the function of generating terrain world objects.
[0025] At this point, the generation of the three-dimensional grid of the plot is completed.
[0026] Furthermore, the step 3 further includes: step 3.6, reading the map data by obtaining the terrain block map file path index, and using the TerrainLayer related API interface to assign the map color of the corresponding terrain.
[0027] Furthermore, it further includes: Step 4, constructing a terrain generation tool and using the obtained standardized three-dimensional terrain data to generate a visual terrain display.
[0028] The present invention can automatically and quickly generate and process terrain data, saving a lot of time and human resources and greatly improving the efficiency of terrain data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to explain the processing method and algorithm of the present invention in more detail and comprehensively, the following will be described in conjunction with the accompanying drawings and specific examples.
[0030] Figure 1 It is a general processing flow chart of dem elevation data of the present invention;
[0031] Figure 2 It is a logic diagram of a general algorithm for generating .TIF elevation data of the present invention;
[0032] Figure 3 It is the UML class diagram of the elevation metadata algorithm;
[0033] Figure 4 It is the UML class diagram of the elevation generation terrain algorithm;
[0034] Figure 5 This is the interface diagram of the visualization tool for reading and generating terrain data. DETAILED DESCRIPTION
[0035] The following is a further description of the specific implementation of the present invention in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0036] The present invention provides a general processing method based on DEM data processing and generating corresponding three-dimensional terrain, aiming to provide an efficient, accurate and visual terrain generation solution.
[0037] The present invention uses Unity3D as a development platform and C# as a scripting language to design a general terrain data processing method and a corresponding three-dimensional terrain generation method, providing an intuitive visualization effect so that developers can more easily understand and operate terrain data. At the same time, this method uses advanced calculation methods and data processing methods to ensure that high performance and efficiency are still guaranteed when processing a large amount of terrain data.
[0038] The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain of the present invention comprises the following steps: step 1, preprocessing the DEM elevation data to obtain standardized terrain data; step 2, reading and parsing the standardized terrain data to obtain DEM elevation source data; step 3, generating Unity Terrain terrain and outputting standardized three-dimensional terrain grid data.
[0039] The following is a detailed description of each step:
[0040] Step 1: DEM elevation data preprocessing
[0041] Since the initial dem elevation data may have problems such as single data being too large, uneven edges, and non-standard geographic projection, preprocessing is required. However, if the dem elevation data meets the specifications, that is, if it is standard terrain data, this step can be omitted.
[0042] The purpose of elevation data preprocessing is to generate terrain data that meets standard geospatial data specifications, map tile specifications, and raster data specifications through a universal operation method for subsequent analysis. The terrain data generated by this step of the present invention can be applied to various fields such as web map applications, three-dimensional visualization environment construction, GIS software, and interactive software applications.
[0043] Figure 1 This is the general processing flow chart of dem elevation data of the present invention. Figure 1 For .tif terrain data or geographic information data (Digital Elevation Model, DEM) obtained from any data source, it is first necessary to determine whether it is a UTM Universal Transverse Mercator projection. If not, the data needs to be adjusted to the UTM projection for processing. If it is a UTM projection, then proceed to determine whether the resolution size of its data source is a standard format resolution. The standard format resolution referred to here is not limited to a uniform value. It depends on different applications and requirements. In this technical solution or its extended applications, the standard resolution size can be an integer power of 2.
[0044] If the resolution does not conform to the standard texture format, you need to use the segmentation tool to segment the terrain and re-cut the metadata resolution to the required standard format size. If the resolution conforms to the standard texture format, you can export it directly, or further subdivide it and then export it by tile segmentation.
[0045] Standard terrain data should use a standard geographic spatial reference system. In this example, WGS84 is used, and the projection method used is UTM projection. The accuracy unit of the terrain is usually meters or kilometers (determined according to actual needs), and the resolution is usually constrained to an integer power of 2 (for example, 256*256, 512*512, 2048*2048).
[0046] Step 2: Read and parse the standardized terrain data
[0047] In this step, mainly taking c# related API and code as an example, the metadata is read and parsed, and stored in the defined class for subsequent 3D mesh generation.
[0048] The elevation data reading and parsing method is designed to read the source data of .tif (or other dem) files through C# program. The algorithm is aimed at the Unity 3D engine platform using C# language, but its internal core calculation method is still applicable to other computer languages and other 3D real-time engines.
[0049] Figure 2 This is the logic diagram of the general algorithm for generating .TIF elevation data in Unity of the present invention. Figure 2 , Figure 2 The whole process of reading, processing, 3D reconstruction and generating 3D display of terrain after data preparation is completed is listed. Figure 2 It covers steps 2 and 3 of the present invention, and fully describes (taking .tif format DEM data as an example) the process from reading elevation metadata, parsing and processing metadata to calculating and generating Unity 3D mesh terrain and terrain mapping.
[0050] Figure 3 This is the UML class diagram of the elevation metadata algorithm. For the elevation metadata reading and parsing method, please refer to Figure 3 The DEM data class specifies three variables, including the width row, height column, and mData[] height data array of the terrain, which is used to store the parsed elevation metadata. Figure 3 The example uses the C# programming language. Those skilled in the art will appreciate that other suitable languages such as C++, Python, etc. may also be used to implement the example.
[0051] The UTM class specifies two variables, including UtmX Mocar projection coordinate X and UtmY Mocar projection coordinate Y. This class is used to store the UTM coordinates after the data of the plot is parsed.
[0052] This step mainly uses a custom DEM class to read the required variables in the metadata and store them in the class and memory for subsequent data calls. The DEM class in the case contains pixel width and height, height information array, and UTM coordinate information.
[0053] The GetTif method is a specific reading algorithm. Its input parameter is the path of the elevation file, and the output result is DEM. The specific calculation example is as follows:
[0054] Use the Tiff.Open method to open the TIFF image file with the specified path, use the image.GetField method to get the width and height of the image, and assign them to the width and height attributes of dem respectively, call the image.ScanlineSize method to get the total number of bytes of a row of data, use two layers of loops to traverse the width and height of the image, and in the inner loop, divide the data obtained from a row of traversal into four bytes (four bytes are a single-precision float) to obtain all the height data corresponding to each row and store them in mData. From then on, all the width and height indexes and height metadata of the terrain are obtained.
[0055] Next, the vertex binding information is obtained through TiffTag.GEOTIFF_MODELTIEPOINTTAG, and the btye array with index 1 is taken out, which stores the UTM coordinate information of the binding point.
[0056] Next, use the BitConverter.ToDouble method to read the UTM coordinate information from it, and save the read UTM coordinates to the UTM class. From then on, the UTM coordinate information of the current plot of terrain is obtained.
[0057] Step 3 Generate 3D Terrain Mesh
[0058] The following uses Unity as an example to describe how to generate standardized 3D terrain corresponding to .TIF elevation data in Unity. Unity Terrain terrain generation aims to achieve data reconstruction and 3D terrain visualization in Unity using the Unity API to read the source data. It is mainly aimed at visualization in Unity, but its core generation process and ideas are still applicable to other 3D real-time engines.
[0059] See also Figure 4 , Figure 4In order to calculate the UML class diagram using the obtained elevation metadata, the specific calculation example is as follows.
[0060] 3.1 Height difference correction calculation
[0061] Since the normalized terrain data obtained in the first step is tiled, the entire data is divided into multiple small tile data for separate reading. Therefore, the height reference of each tile terrain is inconsistent. The three-dimensional grid generated directly in the engine will have inconsistent plot heights and edges that cannot be properly spliced. Therefore, it is necessary to calculate the height offset value of each plot relative to the overall data, and finally assign the offset value to the overall height of the terrain itself to achieve seamless splicing between plots.
[0062] First, traverse all the height values of the plot currently being processed, and calculate the maximum and minimum heights maxt and mint through the MaxValue() and MinValue() calculation methods.
[0063] The MaxValue example algorithm is as follows (MinValue is calculated in the same way):
[0064]
[0065] Define the offsetHeight value, and subtract the lowest height of the overall terrain data from the lowest height of each plot to get the height difference. The example algorithm is as follows:
[0066]
[0067] 3.2 Calculate the height of the plot
[0068] Since the height directly obtained in the metadata is the altitude with geographic information, the altitudes of the plots may be both positive or negative, or one positive and one negative, so the actual height terrainheight of the current plot must be obtained through absolute value comparison. The example algorithm is as follows:
[0069]
[0070] 3.3 Mapping the plot height array
[0071] In this case, the height value of the Unity engine terrain system is defined in the interval [0, 1]. Since the height data value range obtained in the previous step is not in this range, the height data array needs to be remapped to adapt to the Terrain system in the Unity engine. The same processing principle applies to other engines.
[0072] According to the width and height index, traverse all height values, use the parameter remapping algorithm to map all height values to the [0, 1] interval, and store them back as a height array.
[0073] The Remap example algorithm is as follows:
[0074]
[0075]
[0076] 3.4 Calculate the location of the plot
[0077] This step is mainly to obtain the UTM value in step 2 to calculate the coordinates of the lower left corner of each plot, so that the plots can be correctly and automatically arranged according to the coordinate information.
[0078] To automatically arrange the plots according to UTM geographic information, you need to obtain utmx and utmy in the utm class in step 2, subtract the utmx value of a certain benchmark starting plot from utmx, and calculate utmy in the same way. Finally, you will get two converted plot coordinates: ConvertedUtmX and ConvertedUtmY.
[0079] The example algorithm is as follows:
[0080]
[0081] 3.5 Calling terrain API to generate terrain
[0082] In this step, the calculation results and data obtained in 3.1 to 3.4 are combined with the Unity terrain API to generate the final 3D grid model of the land. Here, Unity Terrain is used as an example, and the Terrain system of other engines can be implemented in the same way.
[0083] First, define a new Terrain object and terraindata, and assign all the data obtained from the above calculations to this Terrain.
[0084] Next, get the width from the metadata in step 2 and assign the width value to the heightmapResolutions of Terrain.
[0085] Next, assign the offsetHeight calculated in 3.1 to the Terrain's world position transform.y.
[0086] Next, assign the actual terrain height terrainheight calculated in 3.2 to the y value of terrainData.size.
[0087] Next, the remapped height data calculated in 3.3 is assigned to the height of the terrain through the terrainData.SetHeights method.
[0088] Next, assign the ConvertedUtmX and ConvertedUtmY calculated in 3.4 to the Terrain's world transform.x and transform.z.
[0089] Next, width plus 1 is assigned to Terrain's terrainData.heightmapResolution.
[0090] Next, assign width and terrainheight to Terrain's terrainData.size.
[0091] Next, use the terrain API to complete the function of generating terrain world objects.
[0092] At this point, the generation of the three-dimensional grid of the plot is completed.
[0093] 3.6 Terrain Plot Mapping
[0094] The land parcel map obtained by preprocessing the dem elevation data in step 1 is usually in .JPG format. In this step, the land parcel can be colored directly through the engine-related API interface. Generally speaking, complete geographic data has both height information and color information. The height is used to reflect the three-dimensional form of the terrain, and the color is used to restore the surface appearance of the terrain.
[0095] The texture data is read by obtaining the terrain block texture file path index, and the corresponding terrain texture color is assigned using the TerrainLayer related API interface.
[0096] The present invention standardizes the terrain data that does not meet the specifications, and then, taking the Unity engine as an example, converts the standardized terrain data into a three-dimensional visualized terrain grid. The engine itself is a development tool that combines programming and art, and can further process and export the generated terrain grid. The method of the present invention can quickly generate three-dimensional terrain model materials for subsequent development and production use (the same is true in other engines).
[0097] The present invention can further utilize the obtained standardized three-dimensional terrain data to generate a visualized terrain display, including the following steps:
[0098] Step 4: Build a terrain generation tool and use the obtained standardized 3D terrain data to generate a visual terrain display
[0099] Steps 2 to 3 describe the analytical method and algorithm for plot generation. In step 4, the algorithm can be further encapsulated and integrated through the editor tools of different engines to create corresponding terrain batch generation tools, which can generate the required three-dimensional terrain grid more efficiently and conveniently with one click.
[0100] Figure 5 For terrain data reading and generating visualization tool interface diagram, please refer to Figure 5 In this example, the configurable variables are displayed as parameters in the external parameter panel through the unity related Editor tool, and the tools are used dynamically to load different terrain data according to different situations. Here, the interface of unity3d is used as an example, but it is not limited to using this method to make related configuration tools.
[0101] The invention ensures wide platform applicability, and is applicable to, but not limited to, mainstream 3D interactive real-time engines such as unity3D, Unreal Engine, CryEngine, and mainstream programming languages such as c#, c++, java, and python. The design of the method of the invention can ensure the stability and consistency of parsing terrain data and generating terrain 3D objects on various development platforms.
[0102] The case in this invention is a set of terrain processing processes and operating specifications summarized for Unity. At the same time, this method also provides a general dem terrain processing method for other development platforms.
[0103] The method of the present invention provides accurate terrain data. By standardizing DEM data, it can ensure that the generated terrain is consistent with the original data, reduce errors and inconsistencies, and provide a visual terrain display through Unity.
[0104] The method of the present invention can be applied to development work in various fields. In geographical education, the data processed by the present invention can more conveniently generate three-dimensional terrain as teaching materials, helping to better understand the characteristics and changes of geographic space. In urban planning, the generated terrain can be used to simulate and analyze terrain changes and impacts in different scenarios, providing a scientific basis for planning decisions. In game development, the generated terrain can be used as the basis of game scenes to provide a real and explorable environment. In environmental assessment, the generated terrain can be used to simulate and evaluate the impact of terrain on the environment in different scenarios.
[0105] In summary, this method has certain significance in the fields of geographic information systems, digital entertainment, and three-dimensional visualization. In the field of geographic information systems, this method can be used to simulate terrain changes, urban planning, and other applications, which helps to improve the visualization and analysis capabilities of geographic information data. In the fields of digital entertainment and three-dimensional visualization, this method can help developers create realistic and complex terrains more efficiently and improve development efficiency.
[0106] It should be noted that the above is only an illustrative description and explanation of the present invention, and those skilled in the art should understand that any modification and replacement of the present invention belongs to the protection scope of the present invention.
Claims
1. A general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain, characterized in that: The steps include: Step 1: preprocess the dem elevation data to obtain standardized terrain data, where the standardized terrain data refers to terrain data that conforms to standard geographic spatial data specifications, map tile specifications, and raster data specifications; Step 2: Read and parse the standardized terrain data to obtain the DEM elevation source data, including reading and parsing the metadata, and store it in the following defined class for subsequent 3D mesh generation: The DEM data class specifies three variables, including the width row, height column, and mData[] height data array, which is used to store the parsed elevation metadata. The UTM class specifies two variables, including UtmX Mocar projection coordinate X and UtmY Mocar projection coordinate Y. This class is used to store the UTM coordinates of the parcel data. Step 3: Generate Unity Terrain and output standardized 3D terrain mesh data, including generating standardized 3D terrain corresponding to .TIF elevation data in Unity. Unity Terrain generation aims to realize data reconstruction and 3D terrain visualization in Unity by reading source data through UnityAPI.
2. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 1 is characterized in that: The step 1 includes: for .tif terrain data or geographic information data obtained through any data source, first perform step 1.1: determine whether it is a UTM Universal Mercal projection, if not, adjust the data to the UTM projection for processing, and then enter step 1.2; if it is a UTM projection, directly enter step 1.2, step 1.2 includes: determine whether the resolution size of the data source is a standard format resolution, if the resolution does not conform to the standard map format, use a segmentation tool to segment the terrain, re-cut the resolution of the metadata, and cut it to the standard format size. If the resolution conforms to the standard map format, it is directly exported, or further subdivided and then tiled and exported.
3. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 1 is characterized in that: Standard terrain data adopts the standard geographic spatial reference system and the projection method adopted is UTM projection. The accuracy unit of terrain is meter or kilometer, and the resolution is constrained to the integer power of 2.
4. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 1 is characterized in that: In step 2, use the Tiff.Open method to open the TIFF image file with the specified path, use the image.GetField method to get the width and height of the image, and assign them to the width and height attributes of dem respectively; call the image.ScanlineSize method to get the total number of bytes of a line of data, use two layers of loops to traverse the width and height of the image, and in the inner loop, divide the data obtained by traversing a line into four bytes, that is, four bytes are a single-precision float, so as to obtain all the height data corresponding to each line and store them in mData. From then on, all the width and height indexes and height metadata of the terrain are obtained.
5. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 1 is characterized in that: In step 2, after obtaining all the width and height indexes and height metadata of the terrain, the vertex binding information is obtained through TiffTag.GEOTIFF_MODELTIEPOINTTAG, and the btye array with index 1 is taken out, which stores the UTM coordinate information of the binding point; then, the BitConverter.ToDouble method is used to read the UTM coordinate information from it, and the read UTM coordinates are saved in the UTM class. From then on, the UTM coordinate information of the current plot of the terrain is obtained.
6. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 1 is characterized in that: The step 3 includes: step 3.1, height difference correction calculation, calculating the height offset value of each plot relative to the overall data, and finally assigning the offset value to the overall height of its own terrain to achieve seamless splicing between plots; step 3.2, calculating the plot height, and obtaining the actual height of the current plot by absolute value comparison; step 3.3, mapping the plot height array, mapping all height values to the [0, 1] interval, and re-storing as a height array; step 3.4, calculating the plot position, calculating the lower left corner position coordinates of each plot, and realizing the correct and automatic arrangement of the plots according to the coordinate information; step 3.5, calling the Unity terrain API to generate the final plot three-dimensional mesh model.
7. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 6 is characterized in that: The step 3.4 includes: obtaining utmx and utmy in the utm class in step 2, subtracting the utmx value of a certain benchmark starting plot from utmx, and calculating utmy in the same way, and finally obtaining two converted plot coordinates: ConvertedUtmX and ConvertedUtmY.
8. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 6 is characterized in that: The step 3.5 includes: first, define a new Terrain object and terraindata, and assign all the data obtained by the above calculation to this Terrain. Next, get the width from the metadata in step 2 and assign the width value to the heightmapResolutions of Terrain. Next, assign the offsetHeight calculated in 3.1 to the world position transform.y of Terrain. Next, assign the actual plot height terrainheight calculated in 3.2 to the y value of terrainData.size. Next, the remapped height data calculated in 3.3 is assigned to the height of the terrain through the terrainData.SetHeights method. Next, assign the ConvertedUtmX and ConvertedUtmY calculated in 3.4 to the Terrain's world transform.x and transform.z. Next, add 1 to the width and assign it to Terrain's terrainData.heightmapResolution. Next, assign width and terrainheight to Terrain's terrainData.size. Next, use the terrain API to complete the function of generating terrain world objects. At this point, the generation of the three-dimensional grid of the plot is completed.
9. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 6 is characterized in that: The step 3 further includes: step 3.6, reading the map data by obtaining the terrain block map file path index, and using the TerrainLayer related API interface to assign the map color of the corresponding terrain.
10. The general processing method based on DEM elevation data processing and generating corresponding three-dimensional terrain according to claim 1 is characterized in that: It further includes: Step 4, constructing a terrain generation tool and using the obtained standardized three-dimensional terrain data to generate a visual terrain display.
