A method and system for generating three-dimensional terrain model

Through automated processes, the terrain tile data is extracted and processed, and the three-dimensional terrain model is generated in combination with image data, which solves the problem of complex construction of three-dimensional terrain models in the existing technology and relies on professional software, and realizes efficient and convenient 3-dimensional terrain model generation and deployment.

CN119762694APending Publication Date: 2025-04-04GUANGZHOU FRONTOP DIGITAL ORIGINALITY TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411819548.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The construction process of existing three-dimensional terrain models is complex and depends on GIS engine and professional modeling software, making it difficult to achieve efficient and convenient generation and deployment.

Method used

Through the automated process, the location information of the target area is obtained, the terrain tile data and image tile data are extracted, the terrain data is generated, and the geometry is constructed based on the image data, and finally the three-dimensional terrain model is merged to generate.

Benefits of technology

Reduced dependence on GIS engines and professional modeling software, users only need to enter location information to generate three-dimensional terrain models, improving generation efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762694A_ABST
    Figure CN119762694A_ABST
Patent Text Reader

Abstract

The present application provides a method and system for generating a three-dimensional terrain model, the method comprising: acquiring position information of a target area; extracting a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information; generating respective corresponding terrain data according to respective terrain tile data; combining respective image tile data with corresponding terrain data to generate respective corresponding geometric bodies; merging respective geometric bodies to generate a three-dimensional terrain model corresponding to the target area, thereby realizing automatic generation of a three-dimensional terrain model of the target area according to user requirements, and improving the efficiency of generating the three-dimensional terrain model and the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of geographic data processing technology, and in particular to a method and system for generating a three-dimensional terrain model. Background Art

[0002] A three-dimensional terrain model is a surface model that describes the earth's surface and its features. The feature points and feature lines are three-dimensional. The plane coordinates and elevation of any feature point can be intuitively measured or queried, and it can truly reflect the surface features and phenomena. The three-dimensional terrain model is an indispensable natural simulation element in building city-level digital twin applications. It not only provides a realistic geographical basis for the city model, but also enhances the realism and immersion of the virtual environment. Traditional three-dimensional terrain model construction and rendering mainly use the following two methods:

[0003] First, the first method is to process and publish DEM (digital elevation model) data through GIS (geographic information system) engine, convert it into a 3D terrain model that can be rendered, and then further render the converted 3D terrain model. Although this method is mature, it has certain limitations: once it is separated from the support of GIS engine, DEM data is often difficult to be parsed and used by other systems. In addition, the process of processing DEM data, publishing terrain services, and deploying offline terrain services is not only time-consuming, but also requires professional knowledge and skills, which is a big threshold for non-professionals.

[0004] Secondly, the second method is to use the WebGL engine to render the 3D terrain model. Although this method can provide more flexible and efficient rendering capabilities, it also requires modelers to rely on DEM data and process it through professional modeling software. This not only increases the workload, but also increases the skill requirements for modelers.

[0005] Therefore, compared with the rendering process of the 3D terrain model, the construction process of the 3D terrain model is more important and complex. The complexity of the terrain modeling object determines the complexity of the 3D terrain modeling. Due to the ever-changing field features, in order to make the established mathematical model simulate the ground well, many influencing factors must be considered, including map purpose, map scale, ground resolution, landform type, complexity of terrain changes, terrain slope, etc. With the rapid development of artificial intelligence and various digital twin applications, it is necessary to explore a more efficient and convenient 3D terrain model generation technology. Summary of the invention

[0006] In response to the above technical problems, the present application provides a method and system for generating a three-dimensional terrain model, which can automatically generate a three-dimensional terrain model of a target area according to user needs, thereby improving the efficiency of three-dimensional terrain model generation and user experience.

[0007] In a first aspect, an embodiment of the present application provides a method for generating a three-dimensional terrain model, comprising:

[0008] Obtaining location information of the target area;

[0009] Extracting a plurality of terrain tile data corresponding to the position and a plurality of image tile data corresponding to the position according to the position information;

[0010] Generating respective corresponding terrain data according to respective terrain tile data;

[0011] Combining each of the image tile data with corresponding terrain data to generate corresponding geometric bodies;

[0012] The geometric bodies are combined to generate a three-dimensional terrain model corresponding to the target area.

[0013] The embodiment of the present application provides a method for generating a three-dimensional terrain model, which extracts tile data through an automated process and further generates terrain data, and finally combines terrain data and tile data to generate a three-dimensional terrain model with a map, reducing the previous reliance on GIS engines and professional modeling software in the three-dimensional terrain modeling process. Users only need to input the location information of the target area to generate the corresponding three-dimensional terrain model, so that non-professionals can easily generate and deploy three-dimensional terrain models without the need for additional modeling software processing, greatly shortening the time for terrain modeling, reducing the need for professional knowledge, and improving the efficiency of three-dimensional terrain model generation and user experience.

[0014] In a possible implementation, obtaining the location information of the target area includes obtaining the central longitude and latitude and area radius of the target area input by the user.

[0015] Further, the extracting a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information includes:

[0016] Determine the boundary longitude and latitude of the target area according to the central longitude and latitude and the area radius;

[0017] Calculating and obtaining a tile range interval of the target area according to the boundary longitude and latitude, a preset projection coordinate system, and a preset map zoom level;

[0018] According to the tile range interval, a number of tile data are acquired from a preset database, wherein the tile data includes terrain tile data and image tile data;

[0019] Calculate and obtain the center longitude and latitude coordinates of each tile data according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level;

[0020] According to each of the central longitude and latitude coordinates, the corresponding relationship between each of the tile data and each position of the target area is determined, and then a plurality of terrain tile data of the corresponding position and a plurality of image tile data of the corresponding position are generated.

[0021] The embodiment of the present application provides a method for obtaining tile data. Since the location information of the target area input by the user belongs to the original coordinate system, and the tile data belongs to the projected tile coordinate system, it is necessary to perform coordinate projection changes on the boundary longitude and latitude according to the preset projection coordinate system, determine the corresponding tile range interval, and then extract a number of tile data from the data according to the tile range interval, thereby realizing automatic extraction of tile data. Finally, the center longitude and latitude coordinates of each tile data in the original coordinate system are calculated, so that each tile data can correspond to each position of the target area one by one, providing a data basis for subsequent three-dimensional terrain modeling.

[0022] Furthermore, when the projection coordinate system is a Web Mercator projection, the tile range interval of the target area is calculated according to the boundary longitude and latitude, the preset projection coordinate system and the preset map zoom level, and the specific formula is:

[0023]

[0024]

[0025]

[0026]

[0027] Among them, tileX min and tileX max They are the minimum longitude and maximum longitude in the tile range in the tile coordinate system, tileY min and tileY max are the minimum latitude and maximum latitude in the tile range in the tile coordinate system, respectively. min and x max are the minimum longitude and maximum longitude of the boundary longitude and latitude in the original coordinate system, respectively. min and max They are the minimum latitude and maximum latitude of the boundary longitude and latitude in the original coordinate system, and zoom is the map zoom level.

[0028] Furthermore, when the projection coordinate system is a Web Mercator projection, the central longitude and latitude coordinates of each tile data are calculated according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level. The specific formula is:

[0029]

[0030]

[0031] Among them, x and y are the center longitude coordinates and center latitude coordinates of a tile data in the original coordinate system, tileX and tileY are the tile longitude coordinates and tile latitude coordinates of a tile data in the tile coordinate system, and zoom is the map zoom level.

[0032] In a possible implementation, when generating corresponding first terrain data according to any first terrain tile data in each of the terrain tile data, generating each corresponding terrain data according to each of the terrain tile data includes:

[0033] Traversing the pixel data group in the first terrain tile data to obtain the grayscale value corresponding to each pixel point in the first terrain tile data;

[0034] Convert each of the grayscale values ​​into a corresponding height value;

[0035] Each of the height values ​​is combined with the two-dimensional coordinates of the corresponding pixel point to construct the three-dimensional coordinates of each three-dimensional pixel point and store them in a preset array, thereby obtaining the first terrain data.

[0036] The embodiment of the present application provides a method for generating terrain data. Since the coordinates of each pixel point in the tile data are two-dimensional coordinates, it is necessary to convert the two-dimensional coordinates into three-dimensional coordinates. In this embodiment, since the grayscale value in the terrain tile data is used to represent the height difference of each pixel point, the height value of each pixel point can be extracted by the grayscale value in the terrain tile data, and then the three-dimensional coordinates of each pixel point are generated by combining the two-dimensional coordinates to obtain the corresponding terrain data, so as to prepare data for the subsequent construction of geometric bodies.

[0037] Further, when any first image tile data in each of the image tile data is combined with the corresponding first terrain data to generate a corresponding first geometric body, the step of combining each of the image tile data with the corresponding terrain data to generate each corresponding geometric body includes:

[0038] According to the position distribution of each pixel point in the first terrain data, three adjacent pixel points are used as a triangular face, and then a plurality of triangular faces are constructed;

[0039] Combining the triangular faces to construct the first initial geometric body;

[0040] The first image tile data is combined with the first initial combined body as a texture to construct and generate the first geometric body.

[0041] In a possible implementation, the method for generating a three-dimensional terrain model further includes: when acquiring location information of a target area, acquiring a map zoom level input by a user, and then generating a three-dimensional terrain model of corresponding clarity according to the map zoom level.

[0042] In the embodiment of the present application, the characteristics of the dynamic level of detail (LOD) of the terrain service are combined to support users to input the map zoom level. The user interface allows users to select different map zoom levels. The higher the level, the smaller the geographical area covered by the tiles and the richer the details, thereby realizing dynamic LOD terrain data rendering, adapting to the model requirements of different precisions, and further improving the user experience.

[0043] In a second aspect, accordingly, an embodiment of the present application provides a system for generating a three-dimensional terrain model, including an acquisition module, a tile data extraction module, a terrain data generation module, a geometry generation module, and a merging module;

[0044] Wherein, the acquisition module is used to acquire the location information of the target area;

[0045] The tile data extraction module is used to extract a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information;

[0046] The terrain data generating module is used to generate corresponding terrain data according to the terrain tile data;

[0047] The geometric body generation module is used to combine each of the image tile data with the corresponding terrain data to generate each corresponding geometric body;

[0048] The merging module is used to merge the various geometric bodies to generate a three-dimensional terrain model corresponding to the target area.

[0049] In a possible implementation, when generating corresponding first terrain data according to any first terrain tile data in each of the terrain tile data, generating each corresponding terrain data according to each of the terrain tile data includes:

[0050] Traversing the pixel data group in the first terrain data to obtain the grayscale value corresponding to each pixel point in the first terrain data;

[0051] Convert each of the grayscale values ​​into a corresponding height value;

[0052] Each of the height values ​​is combined with the two-dimensional coordinates of the corresponding pixel point to construct the three-dimensional coordinates of each three-dimensional pixel point and store them in a preset array, thereby obtaining the first terrain data. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 : A flow chart of a method for generating a three-dimensional terrain model provided in an embodiment of the present application.

[0054] Figure 2 : A schematic diagram of code for calculating boundary longitude and latitude in a method for generating a three-dimensional terrain model provided in an embodiment of the present application.

[0055] Figure 3 : A schematic diagram of terrain tile data in a method for generating a three-dimensional terrain model provided in an embodiment of the present application.

[0056] Figure 4 : A schematic diagram of image tile data in a method for generating a three-dimensional terrain model provided in an embodiment of the present application.

[0057] Figure 5 : A schematic diagram of code for generating geometric bodies in a method for generating a three-dimensional terrain model provided in an embodiment of the present application.

[0058] Figure 6 : A schematic diagram of a three-dimensional terrain model generated in a method for generating a three-dimensional terrain model provided in an embodiment of the present application.

[0059] Figure 7 : A schematic diagram of a three-dimensional terrain model generated in a method for generating a three-dimensional terrain model provided in an embodiment of the present application at another angle.

[0060] Figure 8 : A schematic diagram of the geometric body of a three-dimensional terrain model after removing the mapping generated in a three-dimensional terrain model generation method provided in an embodiment of the present application.

[0061] Fig. 9 : A structural schematic diagram of a system for generating a three-dimensional terrain model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0063] It should be noted that the step numbers in the text are only for the convenience of explanation of the specific embodiments and do not serve to limit the order in which the steps are executed. In the description of this application, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0064] Throughout the specification, the tile data described in this specification is a processing method and storage form of map data, which involves preprocessing the vector or image data of the map to form a series of cached image sets. Specifically, tile data is an image that cuts the entire map (such as terrain, roads, satellite images, digital elevation models and other geographic data) into small pieces (usually square or rectangular) according to certain rules. These small pieces of images are called tiles.

[0065] Embodiment 1:

[0066] like Figure 1 As shown, the first embodiment provides a method for generating a three-dimensional terrain model, including steps S1-S5:

[0067] Step S1, obtaining location information of a target area;

[0068] Step S2, extracting a plurality of terrain tile data corresponding to the position and a plurality of image tile data corresponding to the position according to the position information;

[0069] Step S3, generating corresponding terrain data according to each of the terrain tile data;

[0070] Step S4, combining each of the image tile data with corresponding terrain data to generate corresponding geometric bodies;

[0071] Step S5: merge the geometric bodies to generate a three-dimensional terrain model corresponding to the target area.

[0072] The embodiment of the present application provides a method for generating a three-dimensional terrain model, which extracts tile data through an automated process and further generates terrain data, and finally combines terrain data and tile data to generate a three-dimensional terrain model with a map, reducing the previous reliance on GIS engines and professional modeling software in the three-dimensional terrain modeling process. Users only need to input the location information of the target area to generate the corresponding three-dimensional terrain model, so that non-professionals can easily generate and deploy three-dimensional terrain models without the need for additional modeling software processing, greatly shortening the time for terrain modeling, reducing the need for professional knowledge, and improving the efficiency of three-dimensional terrain model generation and user experience.

[0073] In a possible implementation, in step S1, obtaining the location information of the target area includes obtaining the central longitude and latitude and area radius of the target area input by the user.

[0074] In a preferred embodiment, a user interface is usually designed to implement step S1. In the user interface, the user can input the latitude and longitude, radius and default map zoom level (default is level 15), and the system obtains and determines the required image and terrain tile range based on these parameters.

[0075] Furthermore, in step S2, extracting a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information includes:

[0076] Determine the boundary longitude and latitude of the target area according to the central longitude and latitude and the area radius;

[0077] Calculating and obtaining a tile range interval of the target area according to the boundary longitude and latitude, a preset projection coordinate system, and a preset map zoom level;

[0078] According to the tile range interval, a number of tile data are acquired from a preset database, wherein the tile data includes terrain tile data and image tile data;

[0079] Calculate and obtain the center longitude and latitude coordinates of each tile data according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level;

[0080] According to each of the central longitude and latitude coordinates, the corresponding relationship between each of the tile data and each position of the target area is determined, and then a plurality of terrain tile data of the corresponding position and a plurality of image tile data of the corresponding position are generated.

[0081] The embodiment of the present application provides a method for obtaining tile data. Since the location information of the target area input by the user belongs to the original coordinate system, and the tile data belongs to the projected tile coordinate system, it is necessary to perform coordinate projection changes on the boundary longitude and latitude according to the preset projection coordinate system, determine the corresponding tile range interval, and then extract a number of tile data from the data according to the tile range interval, thereby realizing automatic extraction of tile data. Finally, the center longitude and latitude coordinates of each tile data in the original coordinate system are calculated, so that each tile data can correspond to each position of the target area one by one, providing a data basis for subsequent three-dimensional terrain modeling.

[0082] In a preferred embodiment, in step S2, Figure 2 As shown, using Turf.js (geospatial analysis open source library), the boundary longitude and latitude of the target area is calculated based on the input longitude and latitude and radius, that is, x min(minimum longitude), y min (minimum latitude), x max (maximum longitude), y max (maximum latitude). Then use the latitude and longitude and the map zoom level to convert the latitude and longitude coordinates to tile coordinates through the definition of the tile coordinate system. For the Web Mercator projection (EPSG:3857), use the following formula for conversion:

[0083]

[0084]

[0085] Among them, x and y are the coordinates before Web Mercator projection, that is, the coordinates in the original coordinate system; tileX and tileY are the longitude and latitude coordinates after Web Mercator projection, that is, the coordinates in the tile coordinate system, and zoom is the map zoom level.

[0086] Furthermore, when the projection coordinate system is a Web Mercator projection, the tile range interval of the target area is calculated according to the boundary longitude and latitude, the preset projection coordinate system and the preset map zoom level, and the specific formula is:

[0087]

[0088]

[0089]

[0090]

[0091] Among them, tileX min and tileX max They are the minimum longitude and maximum longitude in the tile range in the tile coordinate system, tileY min and tileY max are the minimum latitude and maximum latitude in the tile range in the tile coordinate system, respectively. min and x max are the minimum longitude and maximum longitude of the boundary longitude and latitude in the original coordinate system, respectively. min and max They are the minimum latitude and maximum latitude of the boundary longitude and latitude in the original coordinate system, and zoom is the map zoom level.

[0092] In a preferred embodiment, the step of obtaining some tile data from a preset database according to the tile range is specifically: requesting the data of these tiles through a URL template of an online terrain service. The embodiment of the present application uses an XYZ tile service, and the URL is as follows:

[0093] "http: / / t0.tianditu.gov.cn / img_w / vec_w / {zoom} / {tileX} / {tileY}.png"

[0094] Where {zoom}, {tileX}, and {tileY} are placeholders that are replaced with the actual calculated tile coordinates.

[0095] Furthermore, when the projection coordinate system is a Web Mercator projection, the central longitude and latitude coordinates of each tile data are calculated according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level. The specific formula is:

[0096]

[0097]

[0098] Among them, x and y are the center longitude coordinates and center latitude coordinates of a tile data in the original coordinate system, tileX and tileY are the tile longitude coordinates and tile latitude coordinates of a tile data in the tile coordinate system, and zoom is the map zoom level.

[0099] In a possible implementation, when generating corresponding first terrain data according to any first terrain tile data in each of the terrain tile data, generating each corresponding terrain data according to each of the terrain tile data includes:

[0100] Traversing the pixel data group in the first terrain tile data to obtain the grayscale value corresponding to each pixel point in the first terrain tile data;

[0101] Convert each of the grayscale values ​​into a corresponding height value;

[0102] Each of the height values ​​is combined with the two-dimensional coordinates of the corresponding pixel point to construct the three-dimensional coordinates of each three-dimensional pixel point and store them in a preset array, thereby obtaining the first terrain data.

[0103] The embodiment of the present application provides a method for generating terrain data. Since the coordinates of each pixel point in the tile data are two-dimensional coordinates, it is necessary to convert the two-dimensional coordinates into three-dimensional coordinates. In this embodiment, since the grayscale value in the terrain tile data is used to represent the height difference of each pixel point, the height value of each pixel point can be extracted by the grayscale value in the terrain tile data, and then the three-dimensional coordinates of each pixel point are generated by combining the two-dimensional coordinates to obtain the corresponding terrain data, so as to prepare data for the subsequent construction of geometric bodies.

[0104] Further, when any first image tile data in each of the image tile data is combined with the corresponding first terrain data to generate a corresponding first geometric body, the step of combining each of the image tile data with the corresponding terrain data to generate each corresponding geometric body includes:

[0105] According to the position distribution of each pixel point in the first terrain data, three adjacent pixel points are used as a triangular face, and then a plurality of triangular faces are constructed;

[0106] Combining the triangular faces to construct the first initial geometric body;

[0107] The first image tile data is combined with the first initial combined body as a texture to construct and generate the first geometric body.

[0108] In a preferred embodiment, a terrain tile data such as Figure 3 As shown, the corresponding image tile data is as follows Figure 4 As shown. Extract the depth information from the height map of the terrain tile, traverse the pixel data array, and convert the grayscale value of each pixel into the actual height value. Create an array to store the height value of each vertex. This array will be used to define the height information of THREE.BufferGeometry. After extracting the depth points of the entire tile, construct the initial geometry according to the characteristics of three adjacent points forming a triangle. Then use the image tile of the block as a map to generate THREE.Mesh (geometry). Based on the terrain tile data and image tile data, use three.js to generate the code for the geometry as shown below. Figure 5 shown.

[0109] Finally, in step S5, each geometric body with a map is merged according to the central longitude and latitude coordinates of each tile data to generate a three-dimensional terrain model corresponding to the target area. In a preferred embodiment, a THREE.Object3D object is created as a container to store all tile meshes within the range, and then the GLTFExporter method of three.js is used, and the parameter "binary" is set to true, so that the merged Object3D object can be exported as a model file in GLB format. The final model display effect is as follows: Figure 6-Figure 8 As shown. Furthermore, the method for generating a three-dimensional terrain model provided in the embodiment of the present application also supports direct rendering on a WebGL engine. For example, after generating a three-dimensional terrain model in the GLB format, general WebGL engine libraries such as Three.js, Babylon.js, and Cesium.js all have relevant APIs that can parse model vertex information, generate facets, and load materials, so that the three-dimensional terrain model can be directly rendered after generation without the need for additional modeling software processing, which greatly shortens the time for terrain modeling and reduces the need for professional knowledge.

[0110] In a possible implementation, the method for generating a three-dimensional terrain model further includes: when acquiring location information of a target area, acquiring a map zoom level input by a user, and then generating a three-dimensional terrain model of corresponding clarity according to the map zoom level.

[0111] In the embodiment of the present application, the characteristics of the dynamic level of detail (LOD) of the terrain service are combined to support users to input the map zoom level. The user interface allows users to select different map zoom levels. The higher the level, the smaller the geographical area covered by the tiles and the richer the details, thereby realizing dynamic LOD terrain data rendering, adapting to the model requirements of different precisions, and further improving the user experience.

[0112] In summary, the embodiment of the present application innovatively integrates the online terrain service with the GLTFExporter technology of three.js, and realizes the rapid acquisition and automatic generation of three-dimensional terrain models in GLB format from online data sources. This method is particularly suitable for scenarios that require rapid prototyping and iterative development, significantly reducing manual operations, thereby saving valuable time and human resources when processing large-scale terrain data. In addition, the real-time data update capability of the online service ensures the currency and accuracy of the model. Users can also flexibly adjust the details and complexity of the terrain model according to the needs of specific projects to meet diverse display and analysis needs. Combining the advantages of modern Web technology and cloud services, this embodiment provides an innovative, efficient and cost-effective new approach to three-dimensional terrain modeling, opening up new possibilities for the application and development of geographic information systems.

[0113] Embodiment 2:

[0114] like Fig. 9 As shown, the second embodiment provides a system for generating a three-dimensional terrain model, including an acquisition module 10, a tile data extraction module 20, a terrain data generation module 30, a geometry generation module 40 and a merging module 50;

[0115] Wherein, the acquisition module 10 is used to acquire the location information of the target area;

[0116] The tile data extraction module 20 is used to extract a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information;

[0117] The terrain data generating module 30 is used to generate corresponding terrain data according to the terrain tile data;

[0118] The geometric body generating module 40 is used to combine each of the image tile data with the corresponding terrain data to generate each corresponding geometric body;

[0119] The merging module 50 is used to merge the geometric bodies to generate a three-dimensional terrain model corresponding to the target area.

[0120] In a possible implementation, the acquisition module 10 acquires the location information of the target area, including acquiring the central longitude and latitude and the area radius of the target area input by the user.

[0121] Furthermore, the tile data extraction module 20 extracts a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information, including:

[0122] Determine the boundary longitude and latitude of the target area according to the central longitude and latitude and the area radius;

[0123] Calculating and obtaining a tile range interval of the target area according to the boundary longitude and latitude, a preset projection coordinate system, and a preset map zoom level;

[0124] According to the tile range interval, a number of tile data are acquired from a preset database, wherein the tile data includes terrain tile data and image tile data;

[0125] Calculate and obtain the center longitude and latitude coordinates of each tile data according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level;

[0126] According to each of the central longitude and latitude coordinates, the corresponding relationship between each of the tile data and each position of the target area is determined, and then a plurality of terrain tile data of the corresponding position and a plurality of image tile data of the corresponding position are generated.

[0127] Furthermore, when the projection coordinate system is a Web Mercator projection, the tile range interval of the target area is calculated according to the boundary longitude and latitude, the preset projection coordinate system and the preset map zoom level, and the specific formula is:

[0128]

[0129]

[0130]

[0131]

[0132] Among them, tileX min and tileX max They are the minimum longitude and maximum longitude in the tile range in the tile coordinate system, tileY min and tileY max are the minimum latitude and maximum latitude in the tile range in the tile coordinate system, respectively. min and x max are the minimum longitude and maximum longitude of the boundary longitude and latitude in the original coordinate system, respectively. min and max They are the minimum latitude and maximum latitude of the boundary longitude and latitude in the original coordinate system, and zoom is the map zoom level.

[0133] Furthermore, when the projection coordinate system is a Web Mercator projection, the central longitude and latitude coordinates of each tile data are calculated according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level. The specific formula is:

[0134]

[0135]

[0136] Among them, x and y are the center longitude coordinates and center latitude coordinates of a tile data in the original coordinate system, tileX and tileY are the tile longitude coordinates and tile latitude coordinates of a tile data in the tile coordinate system, and zoom is the map zoom level.

[0137] In a possible implementation, when generating corresponding first terrain data according to any first terrain tile data in each of the terrain tile data, generating each corresponding terrain data according to each of the terrain tile data includes:

[0138] Traversing the pixel data group in the first terrain tile data to obtain the grayscale value corresponding to each pixel point in the first terrain tile data;

[0139] Convert each of the grayscale values ​​into a corresponding height value;

[0140] Each of the height values ​​is combined with the two-dimensional coordinates of the corresponding pixel point to construct the three-dimensional coordinates of each three-dimensional pixel point and store them in a preset array, thereby obtaining the first terrain data.

[0141] Further, when any first image tile data in each of the image tile data is combined with the corresponding first terrain data to generate a corresponding first geometric body, the step of combining each of the image tile data with the corresponding terrain data to generate each corresponding geometric body includes:

[0142] According to the position distribution of each pixel point in the first terrain data, three adjacent pixel points are used as a triangular face, and then a plurality of triangular faces are constructed;

[0143] Combining the triangular faces to construct the first initial geometric body;

[0144] The first image tile data is combined with the first initial combined body as a texture to construct and generate the first geometric body.

[0145] In one possible implementation, the three-dimensional terrain model generation system also includes a zoom level acquisition module, which is used to obtain the map zoom level input by the user when obtaining the location information of the target area, and then generate a three-dimensional terrain model of corresponding clarity according to the map zoom level.

[0146] The more detailed working principle and step flow of this embodiment can refer to, but are not limited to, the relevant records of Embodiment 1.

[0147] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A method for generating a three-dimensional terrain model, characterized in that: include: Obtaining location information of the target area; Extracting a plurality of terrain tile data corresponding to the position and a plurality of image tile data corresponding to the position according to the position information; Generating respective corresponding terrain data according to respective terrain tile data; Combining each of the image tile data with corresponding terrain data to generate corresponding geometric bodies; The geometric bodies are combined to generate a three-dimensional terrain model corresponding to the target area.

2. A method for generating a three-dimensional terrain model according to claim 1, characterized in that: The obtaining of the location information of the target area includes obtaining the central longitude and latitude and the area radius of the target area input by the user.

3. A method for generating a three-dimensional terrain model as claimed in claim 2, characterized in that: The step of extracting a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information includes: Determine the boundary longitude and latitude of the target area according to the central longitude and latitude and the area radius; Calculating and obtaining a tile range interval of the target area according to the boundary longitude and latitude, a preset projection coordinate system, and a preset map zoom level; According to the tile range interval, a number of tile data are acquired from a preset database, wherein the tile data includes terrain tile data and image tile data; Calculate and obtain the center longitude and latitude coordinates of each tile data according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level; According to each of the central longitude and latitude coordinates, the corresponding relationship between each of the tile data and each position of the target area is determined, and then a plurality of terrain tile data of the corresponding position and a plurality of image tile data of the corresponding position are generated.

4. A method for generating a three-dimensional terrain model as claimed in claim 3, characterized in that: When the projection coordinate system is a Web Mercator projection, the tile range interval of the target area is calculated according to the boundary longitude and latitude, the preset projection coordinate system and the preset map zoom level. The specific formula is: Among them, tileX min and tileX max They are the minimum longitude and maximum longitude in the tile range in the tile coordinate system, tileY min and tileY max are the minimum latitude and maximum latitude in the tile range in the tile coordinate system, respectively. min and x max are the minimum longitude and maximum longitude of the boundary longitude and latitude in the original coordinate system, respectively. min and max They are the minimum latitude and maximum latitude of the boundary longitude and latitude in the original coordinate system, and zoom is the map zoom level.

5. The method for generating a three-dimensional terrain model according to claim 3, characterized in that: When the projection coordinate system is a Web Mercator projection, the central longitude and latitude coordinates of each tile data are calculated according to the tile coordinates of each tile data, the projection coordinate system and the map zoom level. The specific formula is: Among them, x and y are the center longitude coordinates and center latitude coordinates of a tile data in the original coordinate system, tileX and tileY are the tile longitude coordinates and tile latitude coordinates of a tile data in the tile coordinate system, and zoom is the map zoom level.

6. A method for generating a three-dimensional terrain model as claimed in claim 1, characterized in that: When generating corresponding first terrain data according to any first terrain tile data among the terrain tile data, generating corresponding terrain data according to the terrain tile data includes: Traversing the pixel data group in the first terrain tile data to obtain the grayscale value corresponding to each pixel point in the first terrain tile data; Convert each of the grayscale values ​​into a corresponding height value; Each of the height values ​​is combined with the two-dimensional coordinates of the corresponding pixel point to construct the three-dimensional coordinates of each three-dimensional pixel point and store them in a preset array, thereby obtaining the first terrain data.

7. A method for generating a three-dimensional terrain model as claimed in claim 6, characterized in that: When any first image tile data in each of the image tile data is combined with the corresponding first terrain data to generate the corresponding first geometric body, the step of combining each of the image tile data with the corresponding terrain data to generate each corresponding geometric body includes: According to the position distribution of each pixel point in the first terrain data, three adjacent pixel points are used as a triangular face, and then a plurality of triangular faces are constructed; Combining the triangular faces to construct the first initial geometric body; The first image tile data is combined with the first initial combined body as a texture to construct and generate the first geometric body.

8. A method for generating a three-dimensional terrain model according to any one of claims 1 to 7, characterized in that: The method for generating a three-dimensional terrain model further includes: when acquiring the location information of the target area, acquiring a map zoom level input by a user, and then generating a three-dimensional terrain model of corresponding clarity according to the map zoom level.

9. A system for generating a three-dimensional terrain model, characterized in that: It includes an acquisition module, a tile data extraction module, a terrain data generation module, a geometry generation module and a merging module; Wherein, the acquisition module is used to acquire the location information of the target area; The tile data extraction module is used to extract a plurality of terrain tile data and a plurality of image tile data of a corresponding position according to the position information; The terrain data generating module is used to generate corresponding terrain data according to the terrain tile data; The geometric body generation module is used to combine each of the image tile data with the corresponding terrain data to generate each corresponding geometric body; The merging module is used to merge the various geometric bodies to generate a three-dimensional terrain model corresponding to the target area.

10. A three-dimensional terrain model generation system as claimed in claim 9, characterized in that: When generating corresponding first terrain data according to any first terrain tile data among the terrain tile data, generating corresponding terrain data according to the terrain tile data includes: Traversing the pixel data group in the first terrain data to obtain the grayscale value corresponding to each pixel point in the first terrain data; Convert each of the grayscale values ​​into a corresponding height value; Each of the height values ​​is combined with the two-dimensional coordinates of the corresponding pixel point to construct the three-dimensional coordinates of each three-dimensional pixel point and store them in a preset array, thereby obtaining the first terrain data.

Citation Information

Cited By

  • Picture generation method and system and computer storage medium

    CN120929549A