Construction method of 3D Tiles data structure

By building a 3D Tiles data structure, using the schema mechanism and minimum units, the problem of geospatial inconsistency between different types of data is solved, and unified storage and management is realized to ensure the consistent expression of data in the real geographical environment.

CN120277165AActive Publication Date: 2025-07-08CHINA AERO GEOPHYSICAL SURVEY & REMOTE SENSING CENT FOR LAND & RESOURCES

Patent Information

Application Number
CN202510351105.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-08
Estimated Expiration
2045-03-24

Smart Images

  • Figure CN120277165A_ABST
    Figure CN120277165A_ABST
Patent Text Reader

Abstract

The invention discloses a method for constructing a 3D Tiles data structure. The method comprises the following steps: acquiring data of different sources and different types; constructing a corresponding data storage table for each type of data, reading information of each type of data, and storing the information in the corresponding data storage table; converting the coordinate system of each type of data into the same coordinate system; exporting each type of data after coordinate system conversion as a glTF model; the method comprises the following steps: constructing a 3D Tiles extension data structure consisting of an index file and a data file, adding schema attributes in the index file, and defining a plurality of data types in the schema attributes; adding a minimum unit attribute field in the root attribute of the index file to record a corresponding data type and an attribute value; and based on the constructed 3D Tiles extension data structure and the glTF model of each type of data, integrating each type of data into 3D Tiles format data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital three-dimensional model construction, and particularly relates to a method for constructing a 3D Tiles data structure. Background Art

[0002] Currently, the technologies related to 3D Tiles on the market mainly focus on coordinate conversion and format conversion. There are also some invention patents that focus on efficiently converting model data in different formats (such as SZ-IFC, FBX, SHP, BIM) into the 3D Tiles format.

[0003] The published patent CN202311376302.4, a conversion method from SZ-IFC to 3D Tiles, parses the SZ-IFC file through a BIM engine to obtain geometric information and non-geometric information, maps the material texture information to the corresponding triangular faces, calculates the Cartesian coordinates of the model origin in the WGS84 system based on the project base point coordinate information of SZ-IFC, constructs a LOD data structure, and organizes and outputs the 3D Tiles model according to the spatial index.

[0004] The published patent 202311664485.X, a method for converting a three-dimensional model in FBX format to 3D Tiles format, parses the FBX file, extracts the three-dimensional model data contained therein, performs coordinate system conversion, optimization, and compression on the model data, slices the optimized three-dimensional model into tiles, generates metadata for each tile, and outputs the generated 3D Tiles data in the form of a file.

[0005] The published patent 202410472251.3, a method and device for parametric construction of a three-dimensional drilling model, constructs a drilling layer-by-layer and color-coded attribute SHP table according to the drilling data source data, performs root-by-root parametric construction of the drilling according to the SHP table to obtain a drilling model object, and then performs Mesh structure conversion and outputs it in 3DTiles format according to the drilling model object to obtain three-dimensional drilling model data.

[0006] The above published patents show that different model data can be converted into the 3D Tiles format, but different model data are not unified in the geographical space and cannot be directly associated. Therefore, in order to maintain a consistent geographical space relationship for different types of data and express it in the real geographical environment, a data structure based on 3D Tiles needs to be established to support the indexing of 3D Tiles data. Summary of the Invention

[0007] In view of the deficiencies in the prior art, the present invention provides a method for constructing a 3D Tiles data structure, which realizes the unified storage and management of different model data in the geographical space through the schema mechanism and the minimum unit.

[0008] The present invention provides the following technical solutions:

[0009] A method for constructing a 3D Tiles data structure, comprising:

[0010] S1. Obtain data from different sources and of different types, where the data includes vector data, image data, and 3D model data;

[0011] S2. Construct corresponding data storage tables for each type of data, read the information of each type of data, and store the information of each type of data into the corresponding data storage tables;

[0012] S3. Convert the coordinate systems of each type of data to the same coordinate system;

[0013] S4. Export each type of data after coordinate system conversion as a glTF model;

[0014] S5. Construct a 3D Tiles extension data structure composed of an index file and a data file, add a schema attribute to the index file, and define multiple data types in the schema attribute to record the data of the corresponding type; add a minimum unit attribute field to the root attribute of the index file to record the corresponding data type and attribute value;

[0015] S6. Integrate each type of data into 3D Tiles format data based on the constructed 3D Tiles extension data structure and the glTF models of each type of data.

[0016] As a further improvement of the present invention, the vector data includes three types: points, lines, and polygons, and the data format is SHP;

[0017] The image data is high-resolution satellite remote sensing images, and the data format is TIF;

[0018] The 3D model data is the data of a model with a 3D shape and appearance constructed by software. The models include point cloud models, oblique photography models, BIM models, and monomerized models, and the data formats include LAS, OSGB, OBJ, and 3DS.

[0019] As a further improvement of the present invention, S2 includes:

[0020] S2.1. Create data file tables, geometric information tables, and attribute information tables for vector data and image data respectively. Among them, the data file table is used to store the files to be processed, the geometric information table is used to store the geometric information of the data, and the attribute information table is used to store the attribute information of the data.

[0021] S2.2. Create a data file table, a geometric information table, an attribute information table, a texture information table, and a model node table for 3D model data. Among them, the data file table is used to store the 3D model files to be processed, the geometric information table is used to store the geometric information corresponding to the 3D model, the attribute information table is used to store the attribute information of the 3D model and all nodes of the 3D model, the texture information table is used to store the texture mapping information of the 3D model, and the model node table is used to store the information of all nodes of the 3D model.

[0022] S2.3. Read various types of information of vector data, image data, and 3D model data respectively, and store the various types of information of each type of data read into the corresponding data storage tables.

[0023] As a further improvement of the present invention, S3 includes:

[0024] S3.1. Read the spatial information in vector data and image data respectively, and convert the vector data and image data from the original coordinate system to the WGS84 coordinate system based on the read spatial information.

[0025] S3.2. Read the spatial information of the 3D model data, obtain the position information of the model data in the original coordinate system and the WGS84 coordinate system, establish a transformation matrix for converting the model data from the original coordinate system to the WGS84 coordinate system, and convert the model data from the original coordinate system to the WGS84 coordinate system based on the transformation matrix.

[0026] As a further improvement of the present invention, S3.2 includes:

[0027] S3.2.1. Read the spatial information of the 3D model data, obtain the position information of any three non - collinear points in the model in the original coordinate system and the ECEF coordinate system, and calculate the transformation matrix for converting the model data from the original coordinate system to the ECEF coordinate system based on the position relationship of these three points in the two coordinate systems.

[0028] S3.2.2. Convert the model data from the original coordinate system to the ECEF coordinate system based on the transformation matrix, and convert the model data from the ECEF coordinate system to the WGS84 coordinate system based on the conversion formula.

[0029] S3.2.3. Convert the 3D model data converted to the ECEF coordinate system into the glTF format, divide the glTF format data into multiple tiles according to the spatial range, each tile contains geometric information and attribute information, and there is a hierarchical relationship between the tiles;

[0030] S3.2.4. Obtain the ECEF coordinates of the center point of the glTF format data, and calculate the global transformation matrix of each tile based on the ECEF coordinates of the center point of the glTF format data and the hierarchical relationship between the tiles. The global transformation matrix of each tile = the transformation matrix of its own tile × the transformation matrix T of the parent node tile ×... × the transformation matrix of the root node tile, so as to locate each tile through recursive combination of the hierarchical matrices.

[0031] As a further improvement of the present invention, the model data is converted from the original coordinate system to the ECEF coordinate system in the order of rotation, scaling, and translation, and the conversion formula is:

[0032] A' = TSRA

[0033] R = R x R y R z

[0034]

[0035]

[0036] Among them, A is the position of the model data in the original coordinate system, A' is the position of the model data in the ECEF coordinate system, R is the rotation transformation matrix, R x 、R y 、R z are the rotation transformation matrices of the x, y, and z axes respectively, S is the scaling transformation matrix, Scale.x, Scale.y, and Scale.z are the scaling multiples of the coordinate values of the x, y, and z axes respectively, T is the translation transformation matrix, and Traslation.x, Traslation.y, and Traslation.z are the translation amounts of the coordinate values of the x, y, and z axes respectively.

[0037] As a further improvement of the present invention, S4 includes:

[0038] S4.1. Read the attribute information table and geometric information table of the vector data after coordinate transformation, generate the json file and bin file of the vector data glTF model, and combine the json file and bin file into the vector data glTF model;

[0039] S4.2. Read the attribute information table and geometric information table of the image data after coordinate transformation, generate the json file and bin file of the image data glTF model, and combine the json file and bin file into the image data glTF model;

[0040] S4.3. Read the attribute information table, model node table, geometric information table and texture information table of the 3D model data after coordinate transformation, generate the json file, bin file and texture file of the 3D model data glTF model, and combine the json file, bin file and texture file into the 3D model data glTF model.

[0041] As a further improvement of the present invention, S4.3 includes:

[0042] S4.3.1. Read the attribute information table and model node table of the 3D model data, and generate the json file of the 3D model data glTF model;

[0043] S4.3.2. Read the geometric information table of the 3D model data, and generate the bin file of the 3D model data glTF model;

[0044] S4.3.3. Read the texture information table of the 3D model data, and generate the texture file of the 3D model data glTF model;

[0045] S4.3.4. Combine the json file, bin file and texture file into the 3D model data glTF model.

[0046] As a further improvement of the present invention, S5 includes:

[0047] S5.1. Add the schema attribute to the index file, and define two parameters, id and classes, for the schema attribute; among them, the classes parameter is defined as the parameter representing the data type, and the classes parameter includes multiple class parameters for recording the data of the corresponding type;

[0048] S5.2. Define three parameters, name, description and properties, for each class parameter respectively; among them, the properties field includes multiple property headers for recording the attribute information of the minimum unit Min unit of the glTF model;

[0049] S5.3. Add the minimum unit attribute field to the content field of the root attribute of the index file, and the number of the minimum unit Min unit in the minimum unit attribute field is the sum of the Min unit quantities of each class parameter under the schema attribute;

[0050] S5.4. Define three parameters, namely uri, metadata, and group, for the minimum unit (Min unit); where uri records the relative path of the binary data file of the Minunit, metadata records the data type and attribute values to which the Min unit belongs, and group records the display grouping of the Min unit;

[0051] S5.5. Define two parameters, namely class and properties, for metadata; where the class parameter records the data type to which the Minunit belongs, and the properties parameter records the attribute information corresponding to the class parameter. The properties parameter records the attribute information.

[0052] As a further improvement of the present invention, S6 includes:

[0053] S6.1. Read the information of the glTF models of various types of data, convert the glTF models of various types of data into the glb format, and establish the relationship between the glb format data of various types of data and the data files constructed in S5;

[0054] S6.2. Based on the spatial range and the characteristics of various types of data, divide the glTF models of various types of data into multiple tiles. Each tile contains a content field, and a bounding box is generated for each tile;

[0055] S6.3. Add a minimum unit attribute field to the content field of each tile, set the class parameter and properties parameter for each minimum unit attribute field, add the corresponding data type to the class parameter, and add the corresponding attribute information to the properties parameter. The attribute information is read from the data storage table; where the class parameter and properties parameter of the minimum unit attribute field are both associated with the schema attribute of the index file constructed in S5 to establish the relationship between each tile of various types of data and the index file;

[0056] S6.4. Based on the relationship between various types of data, the index file, and the data file, integrate various types of data into 3DTiles format data to output the 3D Tiles format data of various types of data, and save the index file and data file of the 3D Tiles format data of various types of data to the specified directory.

[0057] Compared with the prior art, the beneficial effects of the present invention are:

[0058] While preserving data information, a brand-new schema mechanism is introduced. Based on the schema mechanism, the smallest unit is constructed and combined with the schema mechanism to achieve unified storage, management, and indexing of different types of data in the geographical space, enabling different types of data to maintain consistent geographical spatial relationships and enabling different types of data to be expressed in the real geographical environment. Brief Description of the Drawings

[0059] Figure 1 is a flowchart of the method;

[0060] Figure 2 is a schematic diagram of the 3D Tiles extension data structure;

[0061] Figure 3 is a structural diagram of the schema attributes;

[0062] Figure 4 is a structural diagram of the root attributes. Detailed Implementation Manner

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0064] The following further describes the present invention in detail with reference to the accompanying drawings:

[0065] Please refer to Figure 1 , a method for constructing a 3D Tiles data structure, including:

[0066] S1. Obtain data from different sources and of different types, where the data includes vector data, image data, and 3D model data.

[0067] Among them, the vector data includes three types: points, lines, and surfaces, and the data format is SHP. The vector data can select roads, rivers, towns, etc.; the image data is high-resolution satellite remote sensing images, and the data format is TIF. The spatial resolution of the image data is preferably better than 1m. The image data can select data from Gaofen-2, Gaofen-7, or Jilin-1; the 3D model data is data of a model with a three-dimensional shape and appearance constructed by software. The models include point cloud models, oblique photography models, BIM models, and monomerized models, and the data formats include LAS, OSGB, OBJ, and 3DS.

[0068] S2. Build corresponding data storage tables for each type of data, read the information of each type of data, and store the information of each type of data into the corresponding data storage tables. Specifically, it includes the following steps:

[0069] S2.1. Create a data file table, a geometric information table, and an attribute information table for vector data and image data respectively. Among them, the data file table is used to store the files to be processed, the geometric information table is used to store the geometric information of the data, and the attribute information table is used to store the attribute information of the data.

[0070] S2.2. Create a data file table, a geometric information table, an attribute information table, a texture information table, and a model node table for 3D model data. Among them, the data file table is used to store the 3D model files to be processed, the geometric information table is used to store the geometric information corresponding to the 3D model, the attribute information table is used to store the attribute information of the 3D model and all nodes of the 3D model, the texture information table is used to store the texture mapping information of the 3D model, and the model node table is used to store the information of all nodes of the 3D model.

[0071] S2.3. Read the various information of vector data, image data, and 3D model data respectively, and store the various information of each type of data read into the corresponding data storage tables.

[0072] Geometric information includes information such as dimension information, shape information, and position information; attribute information includes information such as feature name, feature type, feature description, feature height, feature area, creation date, etc.; texture information includes information such as texture, color, etc.; node information includes information such as node level, node name, etc.

[0073] S3. Convert the coordinate systems of each type of data to the same coordinate system.

[0074] Since vector data, image data, and 3D model data use different coordinate systems, and different 3D model data also set coordinate information according to their respective models. In order to make all data maintain a consistent geospatial relationship, it is necessary to perform coordinate system conversion on each type of data. 3D Tiles data is usually displayed using Cesium software, and the Cesium architecture uses the WGS84 geographic coordinate system. Therefore, the coordinate systems of various data are uniformly converted to the WGS84 coordinate system. The specific conversion steps are as follows:

[0075] For vector data:

[0076] Read the prj file of the vector data to obtain the coordinate information of the vector; use the Arcgis software, in ArcToolbox, select Data Management Tools>Projections and Transformations>Projection, and perform coordinate system conversion to convert the vector data from the original coordinate system to the WGS84 coordinate system.

[0077] For the image data: Read the xml file of the image data to obtain the coordinate information of the image; use the Arcgis software, in ArcToolbox, select Data Management Tools>Projections and Transformations>Raster>Define Projection, and perform coordinate system conversion to convert the image data from the original coordinate system to the WGS84 coordinate system.

[0078] For the 3D model data:

[0079] Read the spatial information of the 3D model data, obtain the position information of any three non-collinear points in the model in the original coordinate system and the ECEF coordinate system, and based on the position relationship of these three points in the two coordinate systems, calculate the transformation matrix for converting the model data from the original coordinate system to the ECEF coordinate system; convert the model data from the original coordinate system to the ECEF coordinate system in the order of rotation, scaling, and translation, and the conversion formula is:

[0080] A' = TSRA

[0081] R = R x R y R z

[0082]

[0083] Among them, A is the position of the model data in the original coordinate system, A' is the position of the model data in the ECEF coordinate system, R is the rotation transformation matrix, R x 、R y 、R z are the rotation transformation matrices of the x, y, and z axes respectively, S is the scaling transformation matrix, Scale.x, Scale.y, and Scale.z are the scaling multiples of the x, y, and z axis coordinate values respectively, T is the translation transformation matrix, and Traslation.x, Traslation.y, and Traslation.z are the translation amounts of the x, y, and z axis coordinate values respectively.

[0084] The model data is transformed from the original coordinate system to the ECEF coordinate system based on a transformation matrix, and then from the ECEF coordinate system to the WGS84 coordinate system based on a transformation formula. The WGS84 coordinate system of the present invention adopts the LBH longitude and latitude coordinate system, and the transformation formula between the ECEF coordinate system and the LBH longitude and latitude coordinate system is as follows:

[0085] X = (N + H)·cos(L)·cos(B)

[0086] Y = (N + H)·cos(L)·sin(B)

[0087]

[0088] where L represents latitude, B represents longitude, H represents altitude, a and b are respectively the semi-major axis and semi-minor axis of the earth; N represents the radius of curvature, which is related to the latitude L.

[0089] The three-dimensional model data transformed to the ECEF coordinate system is converted into the glTF format, and the glTF format data is divided into multiple tiles according to the spatial range. Each tile contains geometric information and attribute information, and there is a hierarchical relationship between the tiles;

[0090] The ECEF coordinates of the center point of the glTF format data are obtained, and based on the ECEF coordinates of the center point of the glTF format data and the hierarchical relationship between the tiles, the global transformation matrix of each tile is calculated. The global transformation matrix of each tile = the transformation matrix of its own tile × the transformation matrix T of the parent node tile ×... × the transformation matrix of the root node tile, so as to locate each tile through recursive combination of the hierarchical matrices.

[0091] S4. Export each type of data after coordinate transformation as a glTF model, which specifically includes the following steps:

[0092] S4.1. Read the attribute information table of the vector data after coordinate transformation to generate a json file of the vector data glTF model; read the geometric information table of the vector data after coordinate transformation to generate a bin file of the vector data glTF model; combine the json file and the bin file into a glTF file, and each glTF file is a vector data glTF model;

[0093] S4.2. Read the attribute information table of the image data after coordinate transformation to generate a json file of the image data glTF model; read the geometric information table of the image data after coordinate transformation to generate a bin file of the image data glTF model; combine the json file and the bin file into a glTF file, and each glTF file is an image data glTF model;

[0094] S4.3. Read the attribute information table and model node table of the 3D model data after coordinate system conversion to generate a json file of the 3D model data glTF model; read the geometric information table after coordinate system conversion to generate a bin file of the 3D model data glTF model; read the texture information table of the 3D model data after coordinate system conversion to generate a texture file of the 3D model data glTF model; combine the json file, bin file, and texture file into a glTF file, and each glTF file is a 3D model data glTF model.

[0095] S5. Construct a 3D Tiles extension data structure composed of an index file (Tileset.json) and data files (glb). Add a schema attribute to the index file, and define multiple data types in the schema attribute to record data of corresponding types; add a minimum unit attribute field to the root attribute of the index file to record the corresponding data type and attribute value. The constructed 3D Tiles extension data structure is as Figure 2 shown.

[0096] Tileset.json is a json file that describes the entire 3D data set, mainly including 6 attributes: asset, properties, geometricError, root, groups, and metadata. On this basis, the present invention adds an attribute schema, and defines multiple class parameters for the schema to record data of different types. Each class is provided with a properties parameter to record the attribute information of the minimum unit Min unit of each model. In addition, the original root attribute is improved by adding a Min unit attribute field to record the data type and attribute information of the minimum unit.

[0097] The specific construction steps are as follows:

[0098] S5.1. Add a schema attribute to the index file, and define two parameters, id and classes, for the schema attribute; among them, the classes parameter is defined as a parameter representing the data type, and the classes parameter includes VectorClass, ImageClass, PointCloudClass, BIMClass, ModelClass, UndergroundClass, etc., which are used to record vector data, image data, point cloud data, BIM models, monomerized models, underground models, etc. The structure of the schema attribute is as Figure 3 shown;

[0099] S5.2. Define three parameters, namely name, description, and properties, for each class parameter. Among them, the properties parameter includes multiple property headers for recording the property information of the minimum unit (Min unit) of the glTF model. The properties parameter includes 4 fixed parameters, namely the x coordinate, y coordinate, z coordinate, and transformation matrix (transform).

[0100] S5.3. Add the minimum unit (Min unit) property field to the content field of the root property in the index file. The number of minimum units (Min unit) in the minimum unit (Min unit) property field is the sum of the Min unit quantities in each class parameter under the schema property. The structure of the root property is as Figure 4 shown;

[0101] S5.4. Define three parameters, namely uri, metadata, and group, for the minimum unit (Min unit). Among them, uri records the relative path of the binary data file of the Min unit, metadata records the data type and property values to which the Min unit belongs, and group records the display grouping of the Min unit.

[0102] S5.5. Define two parameters, namely class and properties, for metadata. Among them, the class parameter records the data type (i.e., the class name of the data) to which the Min unit belongs, and the properties parameter records the property information recorded in the property field (properties) corresponding to the class parameter, including the x value, y value, z value, and transform value.

[0103] S6. Based on the constructed 3D Tiles extension data structure and the glTF models of various types of data, integrate various types of data into 3D Tiles format data. The specific steps are as follows:

[0104] S6.1. Read the geometry, properties, textures, etc. information of the glTF models of various types of data, convert the glTF models of various types of data into the glb format, and establish the relationship between the glb format data of various types of data and the data files constructed in S5.

[0105] S6.2. Divide the glTF models of each type of data into multiple tiles based on the spatial range and the characteristics of each type of data. Each tile contains a content field, and generate a bounding box for each tile. A bounding box refers to an oriented bounding box, which is defined by a central position and three 3D vectors. The 3D vectors define the directions and half lengths of the x, y, and z axes.

[0106] S6.3. Add a minimum unit attribute field to the content field of each tile, set the class parameter and properties parameter for each minimum unit attribute field, add the corresponding data type to the class parameter, and add the corresponding attribute information to the properties parameter. The attribute information is read from the data storage table. Among them, both the class parameter and the properties parameter of the minimum unit attribute field are associated with the schema attribute of the index file constructed in S5 to establish the relationship between each tile of each type of data and the index file.

[0107] S6.4. Based on the relationship between each type of data, the index file, and the data file, integrate each type of data into 3DTiles format data to output the 3D Tiles format data of each type of data, and save the index file and data file of the 3D Tiles format data of each type of data to the specified directory.

[0108] The data structure construction method provided by the present invention introduces a brand-new schema mechanism while retaining data information. Based on the schema mechanism, the minimum unit is constructed to combine the minimum unit with the schema mechanism, so as to realize the unified storage, management, and indexing of different types of data in the geographical space, enable different types of data to maintain a consistent geographical space relationship, and enable different types of data to be expressed in the real geographical environment.

[0109] Taking the data in Dongdao area as an example, the process of constructing 3D Tiles format data based on multi-source heterogeneous data is specifically described as follows:

[0110] Step 1: Obtain the GF2 remote sensing image of the Dongdao area, the SHP vector of the land use status, and the 3D 3DS model data of the buildings, vegetation, and corals on the island.

[0111] Dongdao is located in Sansha City, Hainan Province. It is an island composed of an uplifted reef and a coral shell sand body, and is a coral island. The island is strip-shaped, surrounded by sand dikes, with lush vegetation and bushes all around.

[0112] The spatial resolution of the acquired GF2 image is 0.8 meters, and the time phase is March 26, 2024; the land use status SHP vector is a polygon file, which is interpreted based on the GF2 image; the 3D models of the buildings, vegetation, and corals on the island are obtained by modeling based on the GF2 image.

[0113] Step 2: Create data storage tables for vector data, image data, and 3D model data respectively:

[0114] Create 3 vector data storage tables, namely shp file table, shp geometry table, and shp properties table; create 3 image data storage tables, namely image file table, image geometry table, and image properties table; create 5 3D model data storage tables, namely model file table, model geometry table, model properties table, model textures table, and model node table.

[0115] Step 3: Read the information of the data:

[0116] Read the xml file of the GF2 image, obtain the geometric information, and record it in the image geometry table. The geometric information includes resolution, spectral range, image width, orbital parameters, etc.; obtain the attribute information, and record it in the image properties table. The attribute information includes band information, sensor type, imaging time, etc.

[0117] Read the shp file of the land use status, obtain the geometric information, and record it in the shp geometry table. The geometric information includes the outer contour, inner contour, etc.; the outer contour is a list of coordinate points, such as [(0,0),(10,0),(10,10),(0,10)]; the inner contour is also a list of coordinate points, such as [(4,4),(6,4),(6,6),(4,6)]. Read the dbf file of the land use status, obtain the attribute information, and record it in the shp properties table. The attribute information includes FID, island name, first-level land type, second-level land type, area, survey date, etc.

[0118] Read the 3DS file of the 3D model, obtain the geometric, attribute, texture, and node information, and record the information in the model geometry, model properties, model textures, and model node tables.

[0119] Taking the island building model as an example, the geometric information includes information such as vertices, edges, faces, and normals; the attribute information includes information such as name, type, material, label, height, area, and number of floors; the texture information includes information such as texture images, texture coordinates, and texture mapping, and the texture image is in jpg format; the node information includes information such as root nodes, child nodes, and hierarchical structures.

[0120] Step 4, convert the coordinate systems of various types of data to the same coordinate system:

[0121] Both the GF2 image and the land use status SHP use the WGS84 coordinate system and do not require conversion.

[0122] Taking the Dongdao residential model as an example, specifically describe the steps of the coordinate system of the 3D model data:

[0123] Convert to obtain the position information of the coordinate origin of the residential model and any other 3 points (non-collinear) in the original coordinate system and the real world (ECEF coordinate system). According to the position relationship of the 3 points in the two coordinate systems, calculate the rotation transformation matrix R.

[0124] When rotating around the x-axis, obtain the rotation matrix R of the x-axis x , and the calculation formula is as follows:

[0125]

[0126] When rotating around the y-axis, obtain the rotation matrix R of the y-axis y , and the calculation formula is as follows:

[0127]

[0128] When rotating around the z-axis, obtain the rotation matrix R of the z-axis z , and the calculation formula is as follows:

[0129]

[0130] Multiply the above three rotation matrices to obtain the rotation transformation matrix R, and the calculation formula is as follows:

[0131]

[0132] If the 3D model is not created according to the actual size of 1:1, it is necessary to scale the model size, and the calculation formula of the scaling transformation matrix S is as follows:

[0133]

[0134] Among them, S is the scaling transformation matrix, and Scale.x, Scale.y, and Scale.z are the magnification (reduction) multiples of the coordinate values on the x, y, and z axes respectively. In this embodiment, the residential model is created according to the real size of 1:1, so the values of Scale.x, Scale.y, and Scale.z are all 1.

[0135] According to the translation transformation matrix, the coordinates are converted to the ECEF coordinate system, and the calculation formula is as follows:

[0136]

[0137] T is the translation transformation matrix, and Traslation.x, Traslation.y, and Traslation.z are the translation amounts of the coordinate values on the x, y, and z axes respectively.

[0138] Therefore, in the order of rotation, scaling, and translation, the coordinates A of the 3D model are coordinate-transformed to obtain the transformed position A', and the calculation formula is as follows:

[0139] A' = TSRA

[0140] Among them, A is the position of the model data in the original coordinate system, and A' is the position of the model data in the ECEF coordinate system.

[0141] According to the above conversion matrix, the original coordinates of the residential model are converted to obtain the model space data in the ECEF coordinate system; based on the conversion formula, the model space data is converted from the ECEF coordinate system to the WGS84 coordinate system.

[0142] The residential model is converted into the glTF format, and the glTF format data is divided into multiple tiles according to the spatial range. Each tile contains geometric information and attribute information, and there is a hierarchical relationship between the tiles (such as building - floor - room).

[0143] Obtain the ECEF coordinates of the center point C of the glTF, and calculate the transformation matrix T of the current tile according to the ECEF coordinates of the center point C, the hierarchical relationship between the tiles, and the absolute coordinate transformation matrix of each tile. The calculation formula for the transformation matrix T is: T = the transformation matrix of the own tile × the transformation matrix of the parent node tile ×... × the transformation matrix of the root node tile, so as to locate each tile through recursive combination of the hierarchical matrix.

[0144] Step 5, export different types of data as a glTF model:

[0145] Read the vector attribute information table and geometric information table, and export the land use status vector as a glTF format; read the image attribute information table and geometric information table, and export the GF2 image as a glTF format; read the attribute information table, geometric information table, model node information table, and texture information table of the 3D model, and export the island building model, vegetation model, and coral model as glTF formats respectively.

[0146] Step 6, based on the schema mechanism and the minimum unit, construct a 3D Tiles extension data structure composed of the tileset.json file and glb files:

[0147] Construct a tileset.json file, add the schema attribute to the tileset.json file, define the id and classes parameters for the schema, and define 5 classes in the classes, namely the VectorClass for recording the land use status vector, the ImageClass for recording the GF2 image, the PlantClass for recording the vegetation model, the BuildingClass for recording the island building model, and the CoralClass for recording the coral model.

[0148] For the VectorClass, the minimum unit Min unit is the polygon, and there are 54 Minunits in the land use status vector; for the ImageClass, the Min unit is the pixel, and there are 2,656,900 Min units in the GF2 image; for the PlantClass, the Min unit is a single tree, and there are 1000 Min units in the vegetation model; for the BuildingClass, the Min unit is a single house, and there are 15 Min units in the island building model; for the CoralClass, the Min unit is a single coral, and there are 100 Min units in the coral model.

[0149] Define the name, description, and properties parameters for each class.

[0150] Define the property headers for the properties of each class, a total of 6, namely name, type, area, x, y, z.

[0151] Define multiple Min units in the content field of the root attribute of the tileset.json file. The number of Min units is equal to the sum of the Min unit quantities in VectorClass, ImageClass, PlantClass, BuildingClass, and CoralClass, totaling 2,658,069.

[0152] Each Min unit defines uri, metadata, and group parameters.

[0153] Define class and properties parameters for metadata. Taking a Min unit of a vector as an example, this Min unit is a shrub patch. class records VectorClass, and properties records shrub, woodland, 1000m 2 、10545000m, 1777600m, 2m.

[0154] Step 7, integrate various models and data structures into the 3DTiles format.

[0155] Read the vector of land use status, GF2 images, island buildings, vegetation, and the glTF models of corals, and convert these glTF models into corresponding glb files respectively. Establish the relationship between the glb files and the glb files of the 3D Tiles extension data structure constructed in Step 6.

[0156] Divide each glTF model into multiple tiles according to the spatial range, generate a bounding box for each tile, add the minimum unit Min unit to all content attributes in each tile, and set the corresponding class type and properties attributes for each Min unit according to the data type to which the glb model connected by each Min unit belongs. Add the attribute field assignments corresponding to the class type to properties, namely name, type, area, x, y, z. Establish the relationship between each tile and the tileset.json file of the 3D Tiles extension data structure constructed in Step 6 according to the divided tile files.

[0157] Finally, output the 3D Tiles format data and save the corresponding json and glb files to the specified directory.

[0158] As can be seen from the above examples, the data structure construction method provided by the present invention introduces a brand-new schema mechanism while retaining data information. The smallest unit is constructed based on the schema mechanism, and the smallest unit is combined with the schema mechanism to achieve unified storage, management, and indexing of different types of data in the geographical space.

[0159] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for constructing a 3D Tiles data structure, characterized in that, Including: S1. Obtain data from different sources and of different types, where the data includes vector data, image data, and 3D model data; S2. Construct corresponding data storage tables for each type of data, read the information of each type of data, and store the information of each type of data into the corresponding data storage tables; S3. Convert the coordinate systems of each type of data to the same coordinate system; S4. Export each type of data after coordinate system conversion as a glTF model respectively; S5. Construct a 3D Tiles extension data structure composed of an index file and a data file. Add a schema attribute to the index file, and define multiple data types in the schema attribute to record data of corresponding types; Add a minimum unit attribute field to the root attribute of the index file to record the corresponding data type and attribute value; S6. Integrate each type of data into 3D Tiles format data based on the constructed 3D Tiles extension data structure and the glTF models of each type of data.

2. The method according to claim 1, wherein The vector data includes three types: points, lines, and polygons, and the data format is SHP; The image data is high-resolution satellite remote sensing images, and the data format is TIF; The 3D model data is the data of a model with a 3D shape and appearance constructed by software. The models include point cloud models, oblique photography models, BIM models, and monomerized models, and the data formats include LAS, OSGB, OBJ, and 3DS.

3. The method according to claim 1 or 2, characterized in that S2 Including: S2.

1. Create a data file table, a geometric information table, and an attribute information table for vector data and image data respectively; among them, the data file table is used to store the files to be processed, the geometric information table is used to store the geometric information of the data, and the attribute information table is used to store the attribute information of the data; S2.

2. Create a data file table, a geometric information table, an attribute information table, a texture information table, and a model node table for 3D model data; among them, the data file table is used to store the 3D model files to be processed, the geometric information table is used to store the geometric information corresponding to the 3D model, the attribute information table is used to store the attribute information of the 3D model and all nodes of the 3D model, the texture information table is used to store the texture mapping information of the 3D model, and the model node table is used to store the information of all nodes of the 3D model; S2.

3. Read various types of information of vector data, image data, and 3D model data respectively, and store the various types of information of each type of data read into the corresponding data storage tables.

4. The method according to claim 1, wherein S3 Including: S3.

1. Read the spatial information in vector data and image data respectively, and based on the read spatial information, convert the vector data and image data from the original coordinate system to the WGS84 coordinate system; S3.

2. Read the spatial information of the 3D model data, obtain the position information of the model data in the original coordinate system and the WGS84 coordinate system, establish a transformation matrix for converting the model data from the original coordinate system to the WGS84 coordinate system, and based on the transformation matrix, convert the model data from the original coordinate system to the WGS84 coordinate system.

5. The method according to claim 4, wherein S3.2 includes: S3.2.

1. Read the spatial information of the 3D model data, obtain the position information of any three non-collinear points in the original coordinate system and the ECEF coordinate system, and calculate the transformation matrix for the transformation of the model data from the original coordinate system to the ECEF coordinate system based on the position relationship of these three points in the two coordinate systems; S3.2.

2. Transform the model data from the original coordinate system to the ECEF coordinate system based on the transformation matrix, and transform the model data from the ECEF coordinate system to the WGS84 coordinate system based on the transformation formula; S3.2.

3. Convert the 3D model data transformed to the ECEF coordinate system into the glTF format, divide the glTF format data into multiple tiles according to the spatial range, each tile contains geometric information and attribute information, and there is a hierarchical relationship between the tiles; S3.2.

4. Obtain the ECEF coordinates of the center point of the glTF format data, and calculate the global transformation matrix of each tile based on the ECEF coordinates of the center point of the glTF format data and the hierarchical relationship between the tiles. The global transformation matrix of each tile = the transformation matrix of its own tile × the transformation matrix T of the parent node tile ×... × the transformation matrix of the root node tile, so as to locate each tile through recursive combination of the hierarchical matrices.

6. The method according to claim 5, wherein Transform the model data from the original coordinate system to the ECEF coordinate system in the order of rotation, scaling, and translation. The transformation formula is: A' = TSRA R = R x R y R z Among them, A is the position of the model data in the original coordinate system, A' is the position of the model data in the ECEF coordinate system, R is the rotation transformation matrix, R x , R y , R z are the rotation transformation matrices of the x, y, and z axes respectively, S is the scaling transformation matrix, Scale.x, Scale.y, and Scale.z are the scaling factors of the x, y, and z axis coordinate values respectively, T is the translation transformation matrix, and Traslation.x, Traslation.y, and Traslation.z are the translation amounts of the x, y, and z axis coordinate values respectively.

7. The method according to claim 3, characterized in that S4 Including: S4.

1. Read the attribute information table and geometric information table of the vector data after coordinate transformation, generate the json file and bin file of the vector data glTF model, and combine the json file and bin file into the vector data glTF model; S4.

2. Read the attribute information table and geometric information table of the image data after coordinate transformation, generate the json file and bin file of the image data glTF model, and combine the json file and bin file into the image data glTF model; S4.

3. Read the attribute information table, model node table, geometric information table, and texture information table of the 3D model data after coordinate transformation, generate the json file, bin file, and texture file of the 3D model data glTF model, and combine the json file, bin file, and texture file into the 3D model data glTF model.

8. The method according to claim 7, wherein S4.3 includes: S4.3.

1. Read the attribute information table and model node table of the 3D model data, and generate the json file of the 3D model data glTF model; S4.3.

2. Read the geometric information table of the 3D model data, and generate the bin file of the 3D model data glTF model; S4.3.

3. Read the texture information table of the 3D model data, and generate the texture file of the 3D model data glTF model; S4.3.

4. Combine the json file, bin file, and texture file into the 3D model data glTF model.

9. The method according to claim 1, wherein S5 Including: S5.

1. Add the schema property to the index file and define two parameters, id and classes, for the schema property. Among them, the classes parameter is defined as a parameter representing the data type, and the classes parameter includes multiple class parameters used to record data of the corresponding type. S5.

2. Define three parameters, name, description, and properties, for each class parameter respectively. Among them, the properties field includes multiple property headers used to record the attribute information of the Min unit, which is the smallest unit of the glTF model. S5.

3. Add the Min unit attribute field to the content field of the root property in the index file. The number of Min units in the Min unit attribute field is the sum of the number of Min units in each class parameter under the schema property. S5.

4. Define three parameters, uri, metadata, and group, for the Min unit. Among them, uri records the relative path of the binary data file of the Min unit, metadata records the data type and attribute values to which the Min unit belongs, and group records the display grouping of the Min unit. S5.

5. Define two parameters, class and properties, for metadata. Among them, the class parameter records the data type to which the Min unit belongs, and the properties parameter records the attribute information recorded by the properties field corresponding to the class parameter.

10. The method according to claim 1, wherein S6 Including: S6.

1. Read the information of the glTF models of each type of data, convert the glTF models of each type of data into the glb format, and establish the relationship between the glb format data of each type of data and the data file constructed in S5. S6.

2. Based on the spatial range and the characteristics of each type of data, divide the glTF models of each type of data into multiple tiles. Each tile contains a content field, and a bounding box is generated for each tile. S6.

3. Add the Min unit attribute field to the content field of each tile, set the class parameter and properties parameter for each Min unit attribute field, add the corresponding data type to the class parameter, and add the corresponding attribute information to the properties parameter. The attribute information is read from the data storage table. Among them, both the class parameter and the properties parameter of the Min unit attribute field are associated with the schema property of the index file constructed in S5 to establish the relationship between each tile of each type of data and the index file. S6.

4. Integrate various types of data into 3D Tiles format data based on the relationships between various types of data and the index file and data file, so as to output the 3D Tiles format data of various types of data, and save the index file and data file of the 3D Tiles format data of various types of data to the specified directory.

Citation Information

Patent Citations

  • Three-dimensional model merging processing method and device and medium

    CN115294312A

  • Multi-level tile joint large-scale digital twinning scene construction method

    CN116842121A

  • Three-dimensional model general format conversion and optimization method

    CN117033475A

  • Reality-based three-dimensional infrastructure reconstruction

    US20210082183A1

Cited By

  • Visual loading tuning method and device based on state grid GIM model

    CN121094253A

  • A method and device for visual loading optimization based on a state grid GIM model

    CN121094253B