CN115719410A - Slicing method of space model data - Google Patents

Slicing method of space model data Download PDF

Info

Publication number
CN115719410A
CN115719410A CN202211498044.2A CN202211498044A CN115719410A CN 115719410 A CN115719410 A CN 115719410A CN 202211498044 A CN202211498044 A CN 202211498044A CN 115719410 A CN115719410 A CN 115719410A
Authority
CN
China
Prior art keywords
model
data
grid
slice
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211498044.2A
Other languages
Chinese (zh)
Inventor
高健
程圆圆
江谋美
沈美岑
蔡红
周培龙
张真真
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Stargis Tianjin Technology Development Co ltd
Original Assignee
Stargis Tianjin Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Stargis Tianjin Technology Development Co ltd filed Critical Stargis Tianjin Technology Development Co ltd
Priority to CN202211498044.2A priority Critical patent/CN115719410A/en
Publication of CN115719410A publication Critical patent/CN115719410A/en
Pending legal-status Critical Current

Links

Images

Abstract

A slicing method of spatial model data relates to the technical field of geographic information, and is characterized by comprising the following steps: reading spatial model data, giving a unique identification for model monomer information reconstruction, generating a slice venation structure, and carrying out multi-scale simplification and combination on each texture picture. Carrying out polymerization simplification on the model triangular points; generating a root node of a section venation, compressing a vertex coordinate of a model in the section and a section file, and generating a file. And forming a slice parent-child node relation tree according to the parent-child corresponding relation of the slices in each grid, and generating a slice index tree. The advantages are that: the given spatial model data can be sliced, the space is divided by using the scalable grids, and multi-level slice data with the fineness from complex to simple is generated in a bottom-up aggregation mode, so that the scheduling and rendering performances of complex scenes and massive spatial model data can be greatly improved, and the consumption of memory, video memory and network bandwidth of the spatial model data in the scenes is reduced.

Description

Slicing method of space model data
Technical Field
The invention relates to the technical field of geographic information, in particular to a method for slicing spatial model data, which can slice given spatial model data, divide a space by using a scalable grid, generate multi-level sliced data with the fineness from complex to simple in a bottom-up aggregation mode, greatly improve the scheduling and rendering performances of complex scenes and massive spatial model data, and reduce the consumption of memory, display memory and network bandwidth of the spatial model data in the scenes.
Background
With the rapid development of IT technology and industry, geographic Information Systems (GIS) have been extensively used in all industries with ITs remarkable features and increasingly powerful functions, and have played an increasingly important role therein. At the same time, these applications in turn put more and higher demands on GIS. People live in a real three-dimensional space, and many practical phenomena such as the design of overpasses and buildings in urban planning and landscape simulation cannot be well solved by depending on the existing 2D GIS; data management and graphic display of underground railways, shopping malls, parking lots and other service facilities; reasonable layout and planning of electric power and communication facilities; the reasonable configuration of the facilities of fire fighting, power supply, water supply, air supply, alarm and the like of the buildings and the residences in the house department; reasonable distribution, management and query of urban ground and underground pipe networks and selection of optimal paths; planning and managing an aviation flight line; description and analysis of various phenomena such as strata, fractures, geological structures, oil reservoirs, underground gas and underground water in the fields of geology, petroleum and the like. All of the three-dimensional data need to be visually expressed in true three dimensions, the traditional 2D GIS can not meet the application requirements of people, and the conversion to the 3D GIS is urgently needed. Therefore, 3D GIS has stimulated strong interest of researchers. Research on 3D GIS has become a focus of academic interest.
With the introduction of a series of concepts such as "digital earth", "digital city", and the like, the application demand of the three-dimensional city model is rapidly increasing. The widespread services of geographic information such as digital cities, virtual geographic environments, etc. also place pressing demands on their three-dimensional representation, and advances in earth observation technology and computer technology, particularly resolution remote sensing technology and computer graphic image processing technology, have provided various display approaches for this purpose. The three-dimensional representation of geographic information has the following notable features:
the three-dimensional representation can give more intuitive spatial elevation information to a user, while the traditional two-dimensional representation reflects the plane position of a spatial object, and the elevation information exists only as an attribute value and cannot be intuitively reflected.
The spatial and temporal distribution of spatial object type and quantity and quality features as well as spatial position of objects and phenomena are indicated in a more intuitive and realistic manner, so that the three-dimensional representation has complete spatial and temporal localization features.
Correspondingly, the digital city is a vivid three-dimensional digital representation about the city, so that people can explore and gather natural and human information about the city and interact with the natural and human information. In the photogrammetry community, digital cities mostly refer to three-dimensional city models which not only present three-dimensional city models, but also provide visual surface descriptions such as vivid material and texture characteristics and related attribute information with photos, and a GIS meeting the needs of digital cities is called a 'digital city GIS'. Compared with three-dimensional visualization and virtual display technologies, practical true three-dimensional GIS is much slower in research progress, and the theory and technology are still immature. Therefore, unlike true three-dimensional GIS in general, digital urban GIS are still only a special prototype method of true three-dimensional GIS at the present stage, and have been simplified in many aspects according to most application requirements, such as adopting an outer surrounding surface model to replace a solid geometric model and fading complex spatial topological relations, etc., and no matter how the real world is mapped to a spatial database, the GIS is emphasized to provide three-dimensional capability in a robust and effective manner.
However, the existing three-dimensional GIS method has several key technical problems to be solved, how to effectively slice given spatial model data, use a scalable grid to segment the space, and generate multi-level slice data with a fine degree from complex to simple through a bottom-up aggregation mode, which can greatly improve the scheduling and rendering performance of complex scenes and massive spatial model data, and reduce the consumption of memory, display memory and network bandwidth of the spatial model data in the scenes.
Disclosure of Invention
In order to overcome the defects of the prior art, the given space model data can be sliced, the space is divided by using the scalable grids, and multi-level slice data with the fineness from complex to simple is generated in a bottom-up aggregation mode, so that the scheduling and rendering performances of complex scenes and massive space model data can be greatly improved, and the consumption of memory, display memory and network bandwidth of the space model data in the scenes is reduced.
A method of slicing spatial model data, wherein the method comprises the steps of: reading space model data: reading multi-source heterogeneous space model data, and extracting geometric information and texture information of the model; unifying the organization forms of the geometric information and the texture information of the model, unifying the spatial reference of the spatial model, storing the model information into a data pool, and establishing a spatial index; dynamic distribution of model data: reading space model data in a data pool, generating basic grids, reading each basic grid data block from the data pool, calculating model bearing capacity, and carrying out space adjustment on grid units with the grid model bearing capacity exceeding a grid bearing capacity threshold value so that the model bearing capacity of all the grids meets a grid bearing capacity threshold value space to obtain a telescopic grid; endowing a unique identifier and a binding identifier reconstructed by the model monomer information to the model information, and distributing the space model data to the corresponding grid unit; model space matching: reading the geometric information of the model from the data block, zeroing the origin of the model, and updating the vertex coordinates of the model; unifying vertex coordinate information of the model in the data block to geographic space coordinates, further converting the model coordinates in the data block into space reference coordinates corresponding to the slice using scene, converting the model vertex position to an actual position in a three-dimensional rendering coordinate system, and updating model scene coordinates; generating a sliced choroid structure: circularly disassembling each model in the data block until the data volume of the model meets a slicing threshold, performing multiple times of aggregation operation on the disassembled model block to obtain multiple model aggregates, and storing each model aggregate as a leaf node of a sliced venation; calculating self-adaptive simplification parameters, simplifying a leaf node model of the slice in a multi-level manner, reallocating texture coordinates, simplifying and combining each texture picture in a multi-scale manner, and updating texture information of the model in the slice; performing multiple times of aggregation operation until all leaf level slices are aggregated to obtain multiple slice aggregates, and binding the leaf nodes of the sliced venation to the middle nodes of the father sliced venation according to the relevant corresponding relation between the leaf nodes of the sliced venation and the middle nodes of the sliced venation obtained by aggregation so that each middle node of the sliced venation and a child node are in a corresponding logical relation; carrying out polymerization simplification on the model triangular points; aggregating all the middle nodes of the sliced venation in the data block into a whole to generate root nodes of the sliced venation, and binding the middle nodes of the sliced venation to the root nodes of the father sliced venation of the middle nodes of the sliced venation to enable each root node of the sliced venation to have a corresponding logical relationship with a child node; outputting a slice file and an index file: and compressing the vertex coordinates of the model in the slice and the slice file, storing the slice information into a system file, and generating a corresponding slice data file. And forming a slice parent-child node relation tree according to the parent-child corresponding relation of the slices in each grid, combining the slice parent-child node relation trees of the grids to generate a slice index tree, and storing the slice index tree into a system file.
A slicing method of spatial model data is provided, wherein the reading of the spatial model data comprises the following specific steps:
multi-source data reading: reading multi-source heterogeneous space model data by using a data interface corresponding to the model data type, and extracting model geometric information and texture information;
model information standardization: unifying the organization forms of the geometric information and the texture information of the model and unifying the spatial reference of the spatial model, converting the vertex coordinates of all the models into a unified coordinate system, storing the geometric information and the texture information of the models into a data pool, and establishing a spatial index in the coordinate range of the whole data pool.
A slicing method of spatial model data is provided, wherein the specific steps of the dynamic distribution of the model data are as follows:
dividing a spatial scalable grid: reading spatial model data in a data pool, calculating the side length of each basic grid block and the geographic coordinate range of each data block, and performing grid division on the spatial range of the model in the data pool to generate a basic grid; reading each basic grid data block from the data pool, and calculating the model bearing capacity of each grid; comparing the model bearing capacity of each data block with a specified grid bearing capacity threshold value, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the upper limit of the grid bearing capacity threshold value, and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the grid bearing capacity threshold value until the model bearing capacity of all grids meets the grid bearing capacity threshold value space, so as to obtain the telescopic grids;
disassembling and redistributing the model: endowing a unique identifier and a binding identifier reconstructed by the model monomer information to the model information; and distributing the space model data to the corresponding grid cells.
A method for slicing spatial model data, wherein the step of partitioning a spatial scalable mesh is:
generating a basic grid: reading spatial model data in a data pool, calculating the side length of basic grid blocks according to the spatial coordinate range of the model, calculating the geographic coordinate range of each data block according to the side length of the grid blocks, and performing grid division on the spatial range of the model in the data pool according to the geographic coordinate range of the data blocks to generate a basic grid; the formula of the geographic coordinate range of the data block is as follows:
XMIN (m,n) =XMINpool+(m-1)×lengthgrid;
XMAX (m,n) =XMINpool+m×lengthgrid;
YMIN (m,n) =YMINpool+(n-1)×lengthgrid;
YMAX (m,n) =YMAX pool +n×length grid
in the formula:
XMIN (m,n) represents the minimum value of the X coordinate of the m-th row and the n-th column grid;
XMAX (m,n) represents the maximum value of the X coordinate of the m-th row and the n-th column grid;
YMIN (m,n) represents the minimum value of Y coordinate of the m-th row and n-th column grids;
YMAX (m,n) represents the maximum value of the Y coordinate of the m-th row and the n-th column grid;
XMIN pool representing the minimum value of the X coordinate in the model space coordinate range from four to four in the data pool;
YMIN pool representing the minimum value of the Y coordinate in the model space coordinate range from four to four in the data pool;
carrying out statistics on the bearing capacity of the grid model: reading data blocks in each basic grid from the data pool, reading geometric information and texture information of spatial model information in the data blocks, and calculating model bearing capacity of each grid, wherein the calculation formula of the model bearing capacity is as follows:
Figure BDA0003965264250000041
in the formula:
capacity grid representing the model bearing capacity of the grid;
k represents the number of models within the grid;
length verCoord representing the coordinate length of the model vertex in the data block;
Length norCoord representing the model normal coordinate length in the data block;
Size float representing the unit storage space occupied by float type data in the slicing target storage computer system;
length texCoord representing the length of the model texture coordinate in the data block;
n texture representing the number of textures of the model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the storage space occupied by the unit pixel in the slice target storage computer system;
generating a flexible grid: comparing the model bearing capacity of each data block with a specified grid bearing capacity threshold, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the grid bearing capacity threshold upper limit, calculating the model bearing capacity of the refined grid units, and carrying out further refinement when the model bearing capacity of the grid units is judged to exceed the specified grid bearing capacity threshold upper limit; and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the grid bearing capacity threshold, calculating the model bearing capacity of the grid units after combination, and carrying out further combination when judging that the model bearing capacity of the grid units exceeds the lower limit of the specified grid bearing capacity threshold until the model bearing capacity of all the grids meets the grid bearing capacity threshold space, thereby obtaining the telescopic grids.
A method for slicing spatial model data is provided, wherein the specific steps of model disassembly and redistribution are as follows:
and generating reconstruction information: generating a unique identifier which can be used for model monomer information reconstruction for each model, and binding the identifier into the model information;
data retrieval and distribution: and searching the space model in the coordinate range of the grid unit in the data pool, and distributing the space model data to the corresponding grid unit.
A method for slicing spatial model data, wherein the concrete steps of model space matching are as follows:
the origin of the model returns to zero: reading the geometric information of the model from each data block, setting the origin of the model to zero, operating a model transformation matrix according to the information of the origin of the model, operating new vertex coordinates of the model by using the model transformation matrix, and updating the vertex coordinates of the model;
unified model geospatial coordinates: unifying the vertex coordinate information of the models in the data block under the geographic space coordinate to form a unified model geographic space coordinate;
rendering scene space coordinates: converting the model coordinates in the data block into the coordinates of the space reference corresponding to the slice using scene, and updating the model posture; and converting the model vertex position into an actual position in a three-dimensional rendering coordinate system, and updating the coordinates of the model scene.
A slicing method for space model data is provided, wherein the model origin is reset to zero;
reading the geometric information of the model: reading geometric information of the model from each data block, and acquiring vertex coordinate information and origin point information of the model;
resetting the original point of the model: zeroing the model origin, and operating a model transformation matrix according to the model origin information before zeroing the model origin; the operation formula of the model transformation matrix is as follows:
Figure BDA0003965264250000051
in the formula:
mat represents a model transformation matrix;
x represents the x coordinate of the model origin before the origin returns to zero;
y represents the origin y coordinate of the model before the origin returns to zero;
z represents the z coordinate of the origin of the model before the origin returns to zero;
updating the space coordinates of the model: calculating new model vertex coordinates by using the model transformation matrix, and replacing the original model vertex coordinates by using the new model vertex coordinates; the new model vertex coordinate operation formula is as follows:
Figure BDA0003965264250000061
in the formula:
mat represents a model transformation matrix;
x old ,y old ,z old representing the original vertex coordinates of the model;
x new ,y new ,z new representing new model vertex coordinates of the model;
a slicing method for space model data is provided, wherein the specific steps of rendering the space coordinates of a scene are as follows:
updating the model posture: converting the model coordinates in the data block into space reference coordinates corresponding to the slice using scene, and updating the position and the rotation angle of the model;
updating the coordinates of the model scene: and converting the model vertex position to an actual position under a three-dimensional rendering coordinate system to obtain a scene coordinate of the model under the three-dimensional rendering coordinate system, and replacing the original model vertex coordinate with the scene coordinate value.
A slicing method of space model data, wherein the specific steps of generating the sliced venation structure are as follows:
generating a sliced venation leaf node: extracting each model information in the data block, obtaining a comparison result of the model data volume and the slice threshold value through an operation formula, circularly disassembling the model until the model data volume meets the slice threshold value, performing multiple times of aggregation operation on the disassembled model block until all the model block is aggregated and grown to obtain a plurality of model aggregates, and storing each model aggregate as a leaf node of the slice venation;
the operation formula for obtaining the model data volume is as follows:
Figure BDA0003965264250000062
in the formula:
Size model representing the amount of model data in the data block;
length verCoord representing the coordinate length of the model vertex in the data block;
Length norCoord representing the model normal coordinate length in the data block;
Size float representing float type numbers in sliced object storage computer systemsAccording to the occupied unit storage space;
length texCoord representing the length of the model texture coordinate in the data block;
n texture representing the number of textures of the model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the storage space occupied by the unit pixel in the slice target storage computer system;
generating a sliced venation intermediate node: calculating self-adaptive simplification parameters according to the quantitative visual distance and the characteristics of the model, simplifying the leaf node model of the section in multiple levels, and reallocating texture coordinates; simplifying each texture picture in a multi-scale mode, merging the texture pictures of the internal model of the leaf node of the slice, and updating the texture information of the internal model of the slice; selecting a leaf node aggregation initial point of a slice and each leaf level slice to carry out multiple aggregation operations until all leaf level slices are aggregated to obtain a plurality of slice aggregates, and binding the leaf node of the slice venation to a middle node of a father slice venation thereof according to the related corresponding relation between the leaf node of the slice venation and the middle node of the slice venation obtained by aggregation so that each middle node of the slice venation and a child node are in a corresponding logical relation;
generating a sliced venation root node: according to the specified simplification degree operation, obtaining a slice deep layer simplification coefficient, and carrying out aggregation simplification on the model triangular points; all the slice venation intermediate nodes in the data block are aggregated into a whole to generate a slice venation root node, and the slice venation intermediate node is bound to a father slice venation root node thereof according to the relevant corresponding relation, so that each slice venation root node and a child node are in a corresponding logical relation.
The deep simplified coefficient operation formula is as follows:
Figure BDA0003965264250000071
in the formula:
n represents the slice depth simplification coefficient;
Size model representing the model data volume;
Size thres representing the upper threshold of the slice root node;
a slicing method for space model data is disclosed, wherein the specific steps of outputting a slice file and an index file are as follows:
and (3) compressing model vertex coordinates: compressing the vertex coordinates of the model in the slice through a compression algorithm, and compressing the floating point type vertex coordinate array into a coordinate array with lower consumption storage space;
and (3) file compression: compressing the whole slice file through a compression algorithm, and recombining a file data structure;
outputting slice data: storing geometric information, texture information and model monomer information reconstruction identification of a model in a slice into an IO stream, storing the IO stream into a system file, naming the file according to longitude and latitude and progression of a grid central point corresponding to the slice, and generating a corresponding slice data file;
outputting an index file: reading the corresponding relationship of the father and the son of the slices in each grid to form a father and son node relationship tree of each grid slice, combining the father and son node relationship trees of the slices of each grid to generate a slice index tree, standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a system file.
A slicing method of spatial model data is provided, wherein the specific steps of outputting an index file are as follows:
reading the slice parent-child node relation: reading the parent-child corresponding relation of the slices in each grid to form a slice parent-child node relation tree corresponding to each grid;
generating a slice index tree: traversing the relation trees of the slice parent-child nodes of each grid, merging the relation trees of the slice parent-child nodes, and generating a slice index tree by combining the stored paths of the slice files;
outputting an index tree: and standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a system file.
A method of slicing spatial model data, wherein multi-source data comprises: and (3) artificially making fine model data, oblique photogrammetry data, BIM data, geological model data and point cloud data.
It can be seen from this that:
the method in the embodiment of the invention can slice the given spatial model data, uses the scalable grids to segment the space, and generates multi-level slice data with the fineness from complex to simple in a bottom-up aggregation mode, thereby greatly improving the scheduling and rendering performances of complex scenes and massive spatial model data and reducing the consumption of memory, video memory and network bandwidth of the spatial model data in the scenes. The scalable grid used by the method can balance the model bearing capacity in each grid data block, so that the resource consumption in the slice calling process is stable, the phenomenon that a certain slice contains a large data volume to cause great rendering time is avoided, the phenomenon that a plurality of slices containing a small data volume consume system disk resources is avoided, and unnecessary network request times are reduced; the vertex coordinates of the model are compressed, so that the space occupied by the vertex coordinate data of the model is reduced, the memory reuse rate is increased by compressing the slice files, the data arrangement is more compact, and the space occupied by the files is reduced; the index tree file describes the organization of the whole slice file, so that the retrieval efficiency of the client to the slice file can be improved; the slice file comprises model monomer information reconstruction identification, so that the model can be picked up in a client use scene after being scattered in the slicing process.
Drawings
FIG. 1 is a schematic overall flow chart of a method for slicing spatial model data provided in an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a spatial model data reading step according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a dynamic model data allocation procedure according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a step of partitioning a spatial scalable mesh according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating a step of disassembling and redistributing a model according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a model space matching procedure according to an embodiment of the present invention;
FIG. 7 is a schematic flow chart illustrating a zeroing step of the origin of the model in an embodiment of the present invention;
FIG. 8 is a flowchart illustrating steps of rendering spatial coordinates of a scene according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a step of generating a sliced venation structure according to an embodiment of the present invention;
FIG. 10 is a flowchart illustrating the steps of slicing files and indexing files according to an embodiment of the present invention;
fig. 11 is a flowchart illustrating a step of outputting an index file according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the technical solution of the present invention, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments, wherein the exemplary embodiments and the description of the present invention are used for explaining the present invention, but not limiting the present invention.
Example 1:
fig. 1 is a schematic flowchart of a slicing method for spatial model data provided in this embodiment, and as shown in fig. 1, the slicing method for spatial model data includes the following steps: reading space model data: reading multi-source heterogeneous space model data, and extracting geometric information and texture information of the model; unifying the organization forms of the geometric information and the texture information of the model, unifying the spatial reference of the spatial model, storing the model information into a data pool, and establishing a spatial index; dynamic allocation of model data: reading space model data in a data pool, generating basic grids, reading each basic grid data block from the data pool, calculating model bearing capacity, and carrying out space adjustment on grid units with the grid model bearing capacity exceeding a grid bearing capacity threshold value so that the model bearing capacity of all the grids meets a grid bearing capacity threshold value space to obtain a telescopic grid; endowing a unique identifier and a binding identifier reconstructed by the model monomer information to the model information, and distributing the space model data to the corresponding grid unit; model space matching: reading the geometric information of the model from the data block, zeroing the origin of the model, and updating the vertex coordinates of the model; unifying vertex coordinate information of the model in the data block to a geographic space coordinate, further converting the model coordinate in the data block into a space reference coordinate corresponding to the slice using scene, converting the model vertex position to an actual position in a three-dimensional rendering coordinate system, and updating a model scene coordinate; generating a sliced choroid structure: circularly disassembling each model in the data block until the data volume of the model meets a slicing threshold, performing multiple times of aggregation operation on the disassembled model block to obtain multiple model aggregates, and storing each model aggregate as a leaf node of a sliced venation; calculating self-adaptive simplification parameters, simplifying a leaf node model of the slice in a multi-level manner, reallocating texture coordinates, simplifying and combining each texture picture in a multi-scale manner, and updating texture information of the model in the slice; performing multiple aggregation operations until all leaf-level slices are aggregated to obtain multiple slice aggregates, and binding the leaf nodes of the sliced venation to the middle nodes of the father sliced venation thereof according to the related corresponding relation between the leaf nodes of the sliced venation and the middle nodes of the sliced venation obtained by aggregation, so that each middle node of the sliced venation and the child nodes are in a corresponding logical relation; carrying out polymerization simplification on the model triangular points; aggregating all the middle nodes of the sliced venation in the data block into a whole to generate root nodes of the sliced venation, and binding the middle nodes of the sliced venation to the root nodes of the father sliced venation of the middle nodes of the sliced venation to enable each root node of the sliced venation to have a corresponding logical relationship with a child node; outputting a slice file and an index file: and compressing the vertex coordinates of the model in the slice and the slice file, storing the slice information into a system file, and generating a corresponding slice data file. And forming a slice parent-child node relation tree according to the parent-child corresponding relation of the slices in each grid, combining the slice parent-child node relation trees of each grid to generate a slice index tree, and storing the slice index tree into a system file.
As shown in fig. 2, a method for slicing spatial model data includes the specific steps of:
multi-source data reading: reading multi-source heterogeneous space model data by using a data interface corresponding to the model data type, and extracting model geometric information and texture information;
model information standardization: unifying the organization forms of the geometric information and the texture information of the model and unifying the spatial reference of the spatial model, converting the vertex coordinates of all the models into a unified coordinate system, storing the geometric information and the texture information of the models into a data pool, and establishing a spatial index in the coordinate range of the whole data pool.
As shown in fig. 3, a method for slicing spatial model data includes the specific steps of dynamically allocating model data:
dividing a spatial scalable grid: reading spatial model data in a data pool, calculating the side length of each basic grid block and the geographic coordinate range of each data block, and performing grid division on the spatial range of the model in the data pool to generate a basic grid; reading each basic grid data block from the data pool, and calculating the model bearing capacity of each grid; comparing the model bearing capacity of each data block with a specified grid bearing capacity threshold value, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the upper limit of the grid bearing capacity threshold value, and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the grid bearing capacity threshold value until the model bearing capacity of all grids meets the grid bearing capacity threshold value space, so as to obtain the telescopic grids;
disassembling and redistributing the model: endowing a unique identifier reconstructed by the model monomer information and binding the identifier to the model information; and distributing the space model data to the corresponding grid cells.
As shown in fig. 4, a method for slicing spatial model data, the step of dividing a spatial scalable mesh is:
generating a basic grid: reading spatial model data in a data pool, calculating the side length of basic grid blocks according to the spatial coordinate range of the model, calculating the geographic coordinate range of each data block according to the side length of the grid blocks, and performing grid division on the spatial range of the model in the data pool according to the geographic coordinate range of the data blocks to generate a basic grid; the data block geographic coordinate range formula is as follows:
XMIN (m,n) =XMIN pool +(m-1)×length grid
XMAX (m,n) =XMIN pool +m×length grid
YMIN (m,n) =YMIN pool +(n-1)×length grid
YMAX (m,n) =YMAX pool +n×length grid
in the formula:
XMIN (m,n) represents the minimum value of the X coordinate of the m-th row and the n-th column of grids;
XMAX (m,b) represents the maximum value of the X coordinate of the m-th row and b-th column grids;
YMIN (m,n) represents the minimum value of the Y coordinate of the m-th row and the n-th column of grids;
YMAX (m,n) represents the maximum value of the Y coordinate of the m-th row and the n-th column grid;
XMIN pool representing the minimum value of the X coordinate in the model space coordinate range from four to four in the data pool;
YMIN pool representing the minimum value of the Y coordinate in the model space coordinate range from four to four in the data pool;
carrying out statistics on the bearing capacity of the grid model: reading data blocks in each basic grid from the data pool, reading geometric information and texture information of spatial model information in the data blocks, and calculating model bearing capacity of each grid, wherein the calculation formula of the model bearing capacity is as follows:
Figure BDA0003965264250000111
in the formula:
capacity grid a model bearing capacity representing a grid;
k represents the number of models within the grid;
length verCoord representing the coordinate length of the model vertex in the data block;
Length norCoord representing the model normal coordinate length in the data block;
Size float representing the unit storage space occupied by float type data in the slicing target storage computer system;
length texCoord representing the length of the model texture coordinate in the data block;
n texture representing the number of textures of the model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the storage space occupied by the unit pixel in the slice target storage computer system;
generating a flexible grid: comparing the model bearing capacity of each data block with a specified grid bearing capacity threshold, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the grid bearing capacity threshold upper limit, calculating the model bearing capacity of the refined grid units, and carrying out further refinement when the model bearing capacity of the grid units is judged to exceed the specified grid bearing capacity threshold upper limit; and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the grid bearing capacity threshold, calculating the model bearing capacity of the grid units after combination, and carrying out further combination when judging that the model bearing capacity of the grid units exceeds the lower limit of the specified grid bearing capacity threshold until the model bearing capacity of all the grids meets the grid bearing capacity threshold space, thereby obtaining the telescopic grids.
As shown in fig. 5, a method for slicing spatial model data includes the specific steps of:
and generating reconstruction information: generating a unique identifier which can be used for model monomer information reconstruction for each model, and binding the identifier into the model information;
data retrieval and distribution: and searching the space model in the grid unit coordinate range in the data pool, and distributing the space model data to the corresponding grid unit.
As shown in fig. 6, a method for slicing spatial model data includes the specific steps of model space matching:
the origin of the model returns to zero: reading the geometric information of the model from each data block, setting the origin of the model to zero, operating a model transformation matrix according to the information of the origin of the model, operating new vertex coordinates of the model by using the model transformation matrix, and updating the vertex coordinates of the model;
unified model geospatial coordinates: unifying the vertex coordinate information of the models in the data block under the geographic space coordinate to form a unified model geographic space coordinate;
rendering scene space coordinates: converting the model coordinates in the data block into coordinates of a space reference corresponding to the slice using scene, and updating the model posture; and converting the model vertex position into an actual position in a three-dimensional rendering coordinate system, and updating the coordinates of the model scene.
As shown in fig. 7, a method for slicing spatial model data, the model origin is zeroed;
reading the geometric information of the model: reading geometric information of the model from each data block, and acquiring vertex coordinate information and origin point information of the model;
resetting the origin of the model: zeroing the model origin, and operating a model transformation matrix according to the model origin information before zeroing the model origin; the operation formula of the model transformation matrix is as follows:
Figure BDA0003965264250000121
in the formula:
mat represents a model transformation matrix;
x represents the x coordinate of the model origin before the origin returns to zero;
y represents the origin y coordinate of the model before the origin returns to zero;
z represents the z coordinate of the origin of the model before the origin returns to zero;
updating the space coordinates of the model: calculating new model vertex coordinates by using the model transformation matrix, and replacing the original model vertex coordinates by using the new model vertex coordinates; the new model vertex coordinate operation formula is as follows:
Figure BDA0003965264250000122
in the formula:
mat represents a model transformation matrix;
x old ,y old ,z old representing the original vertex coordinates of the model;
x new ,y new ,z new representing new model vertex coordinates of the model;
as shown in fig. 8, a method for slicing spatial model data includes the specific steps of rendering spatial coordinates of a scene:
updating the model posture: converting the model coordinates in the data block into space reference coordinates corresponding to the slice using scene, and updating the position and the rotation angle of the model;
updating the coordinates of the model scene: and converting the model vertex position to an actual position under a three-dimensional rendering coordinate system to obtain a scene coordinate of the model under the three-dimensional rendering coordinate system, and replacing the original model vertex coordinate with the scene coordinate value.
As shown in fig. 9, a method for slicing spatial model data, the specific steps of generating a sliced venation structure are as follows:
generating a sliced venation leaf node: extracting each model information in the data block, obtaining a comparison result of the model data volume and the slice threshold value through an operation formula, circularly disassembling the model until the model data volume meets the slice threshold value, performing multiple times of aggregation operation on the disassembled model block until all the model block is aggregated and grown to obtain a plurality of model aggregates, and storing each model aggregate as a leaf node of the slice venation;
the operation formula for obtaining the model data volume is as follows:
Figure BDA0003965264250000131
in the formula:
Size model representing the amount of model data in the data block;
length verCoord representing the length of the model vertex coordinates in the data block;
length norCoord representing the model normal coordinate length in the data block;
Size float representing the unit storage space occupied by float type data in the slicing target storage computer system;
length texCoord representing the length of the model texture coordinate in the data block;
n texture representing the number of textures of the model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the storage space occupied by the unit pixel in the slice target storage computer system;
generating a sliced venation intermediate node: calculating self-adaptive simplification parameters according to the quantitative visual distance and the characteristics of the model, simplifying the leaf node model of the section in multiple levels, and reallocating texture coordinates; simplifying each texture picture in a multi-scale mode, merging the texture pictures of the internal model of the leaf node of the slice, and updating the texture information of the internal model of the slice; selecting a leaf node aggregation initial point of a slice and each leaf level slice to carry out multiple aggregation operations until all leaf level slices are aggregated to obtain a plurality of slice aggregates, and binding the leaf node of the slice venation to a middle node of a father slice venation thereof according to the related corresponding relation between the leaf node of the slice venation and the middle node of the slice venation obtained by aggregation so that each middle node of the slice venation and a child node are in a corresponding logical relation;
generating a sliced venation root node: according to the specified simplification degree operation, obtaining a slice deep layer simplification coefficient, and carrying out aggregation simplification on the model triangular points; all the slice venation intermediate nodes in the data block are aggregated into a whole to generate a slice venation root node, and the slice venation intermediate node is bound to a father slice venation root node thereof according to the relevant corresponding relation, so that each slice venation root node and a child node are in a corresponding logical relation.
The deep simplified coefficient operation formula is as follows:
Figure BDA0003965264250000141
in the formula:
n represents the slice depth simplification coefficient;
Size model representing the model data volume;
Size thres representing the upper threshold limit of the slice root node;
as shown in fig. 10, a method for slicing spatial model data includes the specific steps of outputting a slice file and an index file:
and (3) compressing model vertex coordinates: compressing the vertex coordinates of the model in the slice through a compression algorithm, and compressing the floating point type vertex coordinate array into a coordinate array with lower storage space consumption;
and (3) file compression: compressing the whole slice file through a compression algorithm, and recombining a file data structure;
outputting slice data: storing geometric information, texture information and model monomer information reconstruction identification of a model in a slice into an IO stream, storing the IO stream into a system file, naming the file according to longitude and latitude and progression of a grid central point corresponding to the slice, and generating a corresponding slice data file;
outputting an index file: reading the corresponding relation of the parents and the children of the slices in each grid to form a relation tree of the parents and the children of the slices of each grid, combining the relation trees of the parents and the children of the slices of each grid to generate a slice index tree, standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a system file.
As shown in fig. 11, a method for slicing spatial model data includes the specific steps of outputting an index file:
reading the relationship of the slice parent-child nodes: reading the parent-child corresponding relation of the slices in each grid to form a slice parent-child node relation tree corresponding to each grid;
generating a slice index tree: traversing the relation trees of the slice parent-child nodes of each grid, merging the relation trees of the slice parent-child nodes, and generating a slice index tree by combining the stored paths of the slice files;
outputting an index tree: and standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a system file.
The multi-source data in the specific implementation case comprises the following steps: and (3) artificially making fine model data, oblique photogrammetry data, BIM data, geological model data and point cloud data.
The following is a detailed description of one embodiment.
The method carries out slicing processing on multi-source space model data. By the adoption of the slicing method for the spatial model data, given artificially-made fine model data and geological model data can be sliced, a series of multi-level slice data with the fine degree from complex to simple is generated, and scheduling and rendering performances of the artificially-made fine model data and the geological model data in a scene are improved.
First, spatial model data reading is performed. Reading artificially-made fine model data and geological model data, and extracting artificially-made fine models, geological model vertex coordinate information, normal coordinate information, texture coordinate information and texture picture information; unifying organization forms of the artificially-made fine model, the geological model vertex coordinate information, the normal coordinate information, the texture coordinate information and the texture picture information, unifying spatial references of the artificially-made fine model and the geological model, storing the artificially-made fine model and the geological model information into a data pool, and establishing a spatial index.
Secondly, model data dynamic allocation is performed. Reading artificially-made fine model and geological model data in a data pool, generating basic grids, reading each basic grid data block from the data pool, calculating model bearing capacity, and carrying out spatial adjustment on grid units with the grid model bearing capacity exceeding a grid bearing capacity threshold value so that the model bearing capacity of all the grids meets a grid bearing capacity threshold value space to obtain a telescopic grid; and giving unique identification for reconstructing the monomer information of the artificially manufactured fine model and the geological model, binding the identification to the information of the artificially manufactured fine model and the geological model, and distributing the data of the artificially manufactured fine model and the geological model to the corresponding grid units.
And thirdly, carrying out model space matching. Reading the geometric information of the artificially made fine model and the geological model from the data block, returning the original points of the artificially made fine model and the geological model to zero, and updating the vertex coordinates of the artificially made fine model and the geological model; unifying the artificially-made fine model and the vertex coordinate information and the normal coordinate information of the geological model in the data block to the TJ90 geographic space coordinate, further converting the artificially-made fine model and the geological model coordinate in the data block into the coordinates of CGCS2000 spatial reference corresponding to the slice use scene, converting the positions of the artificially-made fine model and the geological model vertex to actual positions under a three-dimensional rendering coordinate system, and updating the scene coordinates of the artificially-made fine model and the geological model.
Further, a sliced venation structure is generated. Circularly disassembling each artificially-made fine model and geological model in the data block until the data volume of the artificially-made fine model and the geological model meets a 2M slicing threshold, performing multiple times of aggregation operation on the disassembled artificially-made fine model and geological model block to obtain a plurality of artificially-made fine model and geological model aggregates, and storing each artificially-made fine model and geological model aggregate as a sliced venation leaf node; calculating self-adaptive simplification parameters, manually manufacturing a fine model and a geological model on the leaf nodes of the slices for multilevel simplification, reallocating texture coordinates, simplifying and combining all texture pictures in multiple scales, and updating texture information of the manually manufactured fine model and the geological model in the slices; performing multiple aggregation operations until all leaf-level slices are aggregated to obtain multiple slice aggregates, and binding the leaf nodes of the sliced venation to the middle nodes of the father sliced venation thereof according to the related corresponding relation between the leaf nodes of the sliced venation and the middle nodes of the sliced venation obtained by aggregation, so that each middle node of the sliced venation and the child nodes are in a corresponding logical relation; carrying out aggregation simplification on triangular points of artificially made fine models and geological models; all the slice venation middle nodes in the data block are aggregated into a whole to generate slice venation root nodes, and the slice venation middle nodes are bound to father slice venation root nodes of the slice venation middle nodes, so that each slice venation root node and a child node are in a corresponding logical relationship.
And finally, outputting the slice file and the index file. And compressing vertex coordinates of the artificially-made fine model and geological model in the slice and the slice file, storing slice information into a system file, and generating a corresponding slice data file. And forming a slice parent-child node relation tree according to the parent-child corresponding relation of the slices in each grid, combining the slice parent-child node relation trees of each grid to generate a slice index tree, and storing the slice index tree into a system file.
In a specific implementation case, the step of reading the spatial model data may specifically be:
multi-source data reading: reading the artificially-made fine model and the geological model data by using a data interface of the artificially-made fine model and the geological model, and extracting the artificially-made fine model, the geological model vertex coordinate information, the normal coordinate information, the texture coordinate information and the texture picture information;
model information standardization: unifying organization forms of artificially manufactured fine models, geological model vertex coordinate information, normal coordinate information, texture coordinate information and texture picture information, unifying spatial references of the artificially manufactured fine models and the geological models, converting vertex coordinates of all the artificially manufactured fine models and the geological models into a unified TJ90 coordinate system, storing the vertex coordinate information, the normal coordinate information, the texture coordinate information and the texture picture information of the artificially manufactured fine models and the geological models into a data pool, and establishing a spatial index in a coordinate range of the whole data pool.
In a specific embodiment, the step of dynamically allocating the model data may specifically be:
dividing a spatial scalable grid: reading artificially-made fine model and geological model data in a data pool, calculating the side length of each basic grid block and the geographic coordinate range of each data block, and performing grid division on the space range of the artificially-made fine model and the geological model in the data pool to generate a basic grid; reading each basic grid data block from the data pool, and calculating the model bearing capacity of each grid; comparing the model bearing capacity of each data block with a 15M-30M grid bearing capacity threshold, spatially refining grid units of which the model bearing capacity exceeds an upper limit of the 30M grid bearing capacity threshold, and spatially combining the grid units of which the model bearing capacity exceeds a lower limit of the 15M grid bearing capacity threshold until the model bearing capacities of all grids meet the 15M-30M grid bearing capacity threshold space to obtain a telescopic grid;
disassembling and redistributing the model: endowing the artificially-made fine model and the geological model with unique identification of single information reconstruction, and binding the identification to the artificially-made fine model and the geological model information; and distributing the artificially-made fine model and the geological model data to the corresponding grid cells.
In a specific implementation case, the step of dividing the spatial scalable grid may specifically be:
generating a basic grid: reading data of a space artificial fine model and a geological model in a data pool, calculating the side length of basic grid blocks according to the space coordinate range of the artificial fine model and the geological model, calculating the coordinate range of each data block TJ90 according to the side length of the grid blocks, and carrying out grid division on the space range of the artificial fine model and the geological model in the data pool according to the coordinate range of the data block TJ90 to generate a basic grid; the coordinate range formula of the data block TJ90 is as follows:
XMIN (m,n) =XMIN pool +(m-1)×length grid
XMAX (m,n) =XMIN pool +m×length grid
YMIN (m,n) =YMIN pool +(n-1)×length grid
YMAX (m,n) =YMAX pool +n×length grid
in the formula:
XMIN (m,n) represents the minimum value of the X coordinate of the m-th row and the n-th column grid;
XMAX (m,n) represents the maximum value of the X coordinate of the m-th row and the n-th column grid;
YMIN (m,n) represents the minimum value of Y coordinate of the m-th row and n-th column grids;
YMAX (m,n) represents the maximum value of the Y coordinate of the m-th row and the n-th column grid;
XMIN pool representing the minimum value of the X coordinate in the space coordinate range of four to four of the manually manufactured fine model and the geological model in the data pool;
YMIN pool representing the minimum value of Y coordinates in the space coordinate range of four to four of the manually manufactured fine model and the geological model in the data pool;
carrying out statistics on the bearing capacity of the grid model: reading data blocks in each basic grid from a data pool, reading vertex coordinate information, normal coordinate information, texture coordinate information and texture picture information of artificially manufactured fine models and geological model information in the data blocks, and calculating the model bearing capacity of each grid, wherein the calculation formula of the model bearing capacity is as follows:
Figure BDA0003965264250000171
in the formula:
capacity grid representing the model bearing capacity of the grid;
k represents the number of artificially-made fine models and geological models in the grid;
length verCoord representing the coordinate lengths of the vertexes of the artificially made fine model and geological model in the data block;
length norCoord representing the coordinate length of the normal line of the artificially made fine model and geological model in the data block;
Size float representing the unit storage space occupied by float type data in a Windows 64-bit computer system;
length texCoord representing the coordinate length of the texture of the fine model and the geological model artificially made in the data block;
n texture representing the number of textures of the artificially-made fine model and the geological model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the memory space occupied by the unit pixel in the Windows 64-bit system;
generating a flexible grid: comparing the model bearing capacity of each data block with a 15M-30M grid bearing capacity threshold, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the upper limit of the 30M grid bearing capacity threshold, calculating the model bearing capacity of the refined grid units, and carrying out further refinement when the model bearing capacity of the grid units exceeds the upper limit of the 30M grid bearing capacity threshold; and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the 15M grid bearing capacity threshold, calculating the model bearing capacity of the grid units after combination, and carrying out further combination when the model bearing capacity of the grid units is judged to exceed the lower limit of the 15M grid bearing capacity threshold until the model bearing capacity of all the grids meets the 15M-30M grid bearing capacity threshold space, so as to obtain the telescopic grids.
In a specific implementation case, the step of disassembling and redistributing the model may specifically be:
and generating reconstruction information: generating a unique identifier which can be used for model monomer information reconstruction for each artificially-made fine model and geological model, and binding the identifier into the artificially-made fine model and geological model information;
data retrieval and distribution: and retrieving the artificially-made fine model and the geological model in the coordinate range of the grid unit in the data pool, and distributing the artificially-made fine model and the geological model data to the corresponding grid unit.
In a specific embodiment, the step of model space matching may specifically be:
the origin of the model returns to zero: reading the geometric information of the artificially-made fine model and the geological model from each data block, zeroing the original points of the artificially-made fine model and the geological model, operating a model transformation matrix according to the information of the artificially-made fine model and the original point of the geological model, operating new vertex coordinates of the artificially-made fine model and the geological model by using the model transformation matrix, and updating the vertex coordinates of the artificially-made fine model and the geological model;
unified model geospatial coordinates: unifying vertex coordinate information of the artificially-made fine model and the geological model in the data block to a TJ90 geographic space coordinate to form a unified TJ90 model geographic space coordinate;
rendering scene space coordinates: converting the coordinates of the artificially-made fine model and the geological model in the data block into coordinates of CGCS2000 space reference corresponding to the slice use scene, and updating the postures of the artificially-made fine model and the geological model; and converting the positions of the artificially made fine model and the geological model vertex into actual positions under a three-dimensional rendering coordinate system, and updating scene coordinates of the artificially made fine model and the geological model.
In a specific implementation case, the step of zeroing the origin of the model may specifically be:
reading the geometric information of the model: reading the geometric information of the artificially made fine model and the geological model from each data block, and acquiring the vertex coordinate information of the artificially made fine model and the geological model and the origin point information of the artificially made fine model and the geological model;
resetting the origin of the model: zero setting the artificially-made fine model and the geological model origin, and calculating a model transformation matrix according to model origin information before zero setting of the artificially-made fine model and the geological model origin; the operation formula of the model transformation matrix is as follows:
Figure BDA0003965264250000191
in the formula:
mat represents a model transformation matrix;
x represents the original point x coordinate of the artificially manufactured fine model and geological model before the original point returns to zero;
y represents the original point y coordinate of the manually manufactured fine model and geological model before the original point returns to zero;
z represents the z coordinate of the origin of the fine model and the geological model which are manually manufactured before the origin returns to zero;
updating the space coordinates of the model: calculating new artificially-made fine models and geological model vertex coordinates by using the model transformation matrix, and replacing the artificially-made fine models and the geological model original vertex coordinates by using the new artificially-made fine models and the geological model vertex coordinates; the new artificially-made fine model and geological model vertex coordinate operation formula is as follows:
Figure BDA0003965264250000192
in the formula:
mat represents a model transformation matrix;
x old ,y old ,z old representing the original vertex coordinates of the artificially manufactured fine model and geological model;
x new ,y new ,z new representing the new model vertex coordinates of artificially manufactured fine models and geological models;
in a specific implementation case, the step of rendering the spatial coordinates of the scene may specifically be:
updating the model posture: converting the coordinates of the artificially-made fine model and the geological model in the data block into CGCS2000 space reference coordinates corresponding to the slice using scene, and updating the positions and the rotation angles of the artificially-made fine model and the geological model;
updating the coordinates of the model scene: and converting the vertex positions of the artificially-made fine model and the geological model into actual positions under a three-dimensional rendering coordinate system, obtaining scene coordinates of the artificially-made fine model and the geological model under the three-dimensional rendering coordinate system, and replacing the vertex coordinates of the original model with the scene coordinate values.
In an embodiment, the step of generating the sliced venation structure may specifically be:
generating a sliced venation leaf node: extracting information of each artificially made fine model and geological model in the data block, obtaining a comparison result of the artificially made fine model and the geological model data volume and a 2M slicing threshold value through an operational formula, circularly disassembling the artificially made fine model and the geological model until the artificially made fine model and the geological model data volume meet the 2M slicing threshold value, performing multiple times of aggregation operation on the disassembled model block until all the model block grows in an aggregated mode to obtain a plurality of model aggregates, and storing each model aggregate as a slicing venation leaf node;
the operation formula for obtaining the data volume of the artificially-made fine model and the geological model is as follows:
Figure BDA0003965264250000201
in the formula:
Size model representing the data quantity of the fine model and the geological model artificially made in the data block;
length verCoord representing the coordinate lengths of vertexes of the artificially manufactured fine model and geological model in the data block;
length norCoord representing the coordinate length of the normal line of the artificially made fine model and geological model in the data block;
Size float representing the unit storage space occupied by float type data in a Windows 64-bit computer system;
length texCoord representing the coordinate length of the texture of the artificially made fine model and geological model in the data block;
n texture representing the number of textures of the artificially-made fine model and the geological model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the memory space occupied by the unit pixel in a Windows 64-bit computer system;
generating a sliced venation intermediate node: calculating self-adaptive simplification parameters according to the visual distance of 500m and the characteristics of the artificially made fine model and the geological model, carrying out multi-level simplification on the artificially made fine model and the geological model of the leaf nodes of the section, and reallocating texture coordinates; simplifying each texture picture in a multi-scale mode, combining texture pictures of artificially made fine models and geological models in leaf nodes of the slices, and updating texture information of the artificially made fine models and the geological models in the slices; selecting a leaf node aggregation initial point of the slicing and carrying out multiple aggregation operations on each leaf level slice until all leaf level slices are aggregated to obtain multiple slicing aggregates, and binding the leaf node of the slicing venation to a middle node of a father slicing venation of the leaf node of the slicing venation according to the relevant corresponding relation between the leaf node of the slicing venation and the middle node of the slicing venation obtained by aggregation to ensure that each middle node of the slicing venation and a child node are in a corresponding logical relation;
generating a sliced venation root node: obtaining a slice deep layer simplification coefficient according to 30% simplification degree operation, and carrying out aggregation simplification on triangular points of artificially made fine models and geological models; all the slice venation intermediate nodes in the data block are aggregated into a whole to generate a slice venation root node, and the slice venation intermediate node is bound to a father slice venation root node thereof according to the relevant corresponding relation, so that each slice venation root node and a child node are in a corresponding logical relation.
The deep simplified coefficient operation formula is as follows:
Figure BDA0003965264250000202
in the formula:
n represents the slice depth simplification coefficient;
Size model representing the data volume of artificially made fine models and geological models;
Size thres representing the upper threshold of the slice root node;
in an embodiment, the step of outputting the slice file and the index file may specifically be:
and (3) compressing model vertex coordinates: compressing the vertex coordinates of the artificially-made fine model and the geological model in the slice by a compression algorithm, and compressing the floating point type vertex coordinate array into a coordinate array with lower storage space consumption;
and (3) file compression: compressing the whole slice file through a zip compression algorithm, and recombining a file data structure;
outputting slice data: manually manufacturing a fine model in a slice, storing vertex coordinate information, normal coordinate information, texture picture information and model monomer information reconstruction identification of a geological model in the slice into an IO stream, storing the IO stream into a Windows system file, naming the file according to the longitude and latitude and the stage number of a grid central point corresponding to the slice, and generating a corresponding slice data file;
outputting an index file: reading the corresponding relationship of the parents and the children of the slices in each grid to form a relation tree of the parents and the children of the slices of each grid, combining the relation trees of the parents and the children of the slices of each grid to generate a slice index tree, standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a Windows system file.
In a specific implementation case, the step of outputting the index file may specifically be:
reading the relationship of the slice parent-child nodes: reading the parent-child corresponding relation of the slices in each grid to form a slice parent-child node relation tree corresponding to each grid;
generating a slice index tree: traversing the relation trees of the slice parent-child nodes of each grid, merging the relation trees of the slice parent-child nodes, and generating a slice index tree by combining the stored paths of the slice files;
outputting an index tree: and standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a Windows system file.
The foregoing method descriptions and flow diagrams are provided merely as illustrative examples and are not intended to require or imply that the steps of the above-described operations or aspects must be performed in the order presented. As will be appreciated by one skilled in the art, the order of the blocks in the foregoing aspects may be performed in any order. Words such as "thereafter," "then," "next," etc. are not intended to limit the order of operations or steps; these words are used only to guide the reader through the description of the method. Furthermore, any reference to claim elements in the singular, for example, using the articles "a," "an," or "the" is not to be construed as limiting the element to the singular.
The various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the aspects disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall method. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The method in the embodiment of the invention can slice the given spatial model data, uses the scalable grids to segment the space, and generates multi-level slice data with the fineness from complex to simple in a bottom-up aggregation mode, thereby greatly improving the scheduling and rendering performances of complex scenes and massive spatial model data and reducing the consumption of memory, video memory and network bandwidth of the spatial model data in the scenes. The scalable grid used by the method can balance the model bearing capacity in each grid data block, so that the resource consumption in the slice calling process is stable, the phenomenon that a certain slice contains a large data volume to cause great rendering time is avoided, the phenomenon that a plurality of slices containing a small data volume consume system disk resources is avoided, and unnecessary network request times are reduced; the vertex coordinates of the model are compressed, so that the space occupied by the vertex coordinate data of the model is reduced, the memory reuse rate is increased by compressing the slice files, the data arrangement is more compact, and the space occupied by the files is reduced; the index tree file describes the organization of the whole slice file, so that the retrieval efficiency of the client to the slice file can be improved; the slice file comprises model monomer information reconstruction identification, so that the model can be picked up in a client use scene after being scattered in the slicing process.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for slicing spatial model data, the method comprising the steps of: reading space model data: reading multi-source heterogeneous space model data, and extracting geometric information and texture information of the model; unifying the organization forms of the geometric information and the texture information of the model, unifying the spatial reference of the spatial model, storing the model information into a data pool, and establishing a spatial index; dynamic allocation of model data: reading space model data in a data pool, generating basic grids, reading each basic grid data block from the data pool, calculating model bearing capacity, and carrying out space adjustment on grid units with the grid model bearing capacity exceeding a grid bearing capacity threshold value so that the model bearing capacity of all the grids meets a grid bearing capacity threshold value space to obtain a telescopic grid; endowing a unique identifier and a binding identifier reconstructed by the model monomer information to the model information, and distributing the space model data to the corresponding grid unit; model space matching: reading the geometric information of the model from the data block, zeroing the origin of the model, and updating the vertex coordinates of the model; unifying vertex coordinate information of the model in the data block to a geographic space coordinate, further converting the model coordinate in the data block into a space reference coordinate corresponding to the slice using scene, converting the model vertex position to an actual position in a three-dimensional rendering coordinate system, and updating a model scene coordinate; generating a sliced choroid structure: circularly disassembling each model in the data block until the data volume of the model meets a slicing threshold, performing multiple times of aggregation operation on the disassembled model block to obtain multiple model aggregates, and storing each model aggregate as a leaf node of a sliced venation; calculating self-adaptive simplification parameters, simplifying a leaf node model of the slice in a multi-level manner, reallocating texture coordinates, simplifying and combining each texture picture in a multi-scale manner, and updating texture information of the model in the slice; performing multiple aggregation operations until all leaf level slices are aggregated to obtain a plurality of slice aggregates, and binding leaf nodes of the sliced venation to father nodes of the leaf nodes to enable middle nodes of each sliced venation to be in corresponding logical relations with child nodes; carrying out polymerization simplification on the model triangular points; aggregating all the middle nodes of the sliced venation in the data block into a whole to generate root nodes of the sliced venation, and binding the middle nodes of the sliced venation to father root nodes of the middle nodes of the sliced venation so that each root node of the sliced venation and a child node are in a corresponding logical relationship; outputting a slice file and an index file: compressing the vertex coordinates of the model in the slice and the slice file, storing the slice information into a system file, and generating a corresponding slice data file; and forming a slice parent-child node relation tree according to the parent-child corresponding relation of the slices in each grid, combining the slice parent-child node relation trees of each grid to generate a slice index tree, and storing the slice index tree into a system file.
2. The method for slicing spatial model data as set forth in claim 1, wherein: the specific steps of reading the space model data are as follows:
multi-source data reading: reading multi-source heterogeneous space model data by using a data interface corresponding to the model data type, and extracting model geometric information and texture information;
model information standardization: unifying the organization forms of the geometric information and the texture information of the model and unifying the spatial reference of the spatial model, converting the vertex coordinates of all the models into a unified coordinate system, storing the geometric information and the texture information of the models into a data pool, and establishing a spatial index in the coordinate range in the whole data pool.
3. The method for slicing spatial model data as set forth in claim 1, wherein: the specific steps of the dynamic distribution of the model data are as follows:
dividing a space scalable grid: reading spatial model data in a data pool, calculating the side length of each basic grid block and the geographic coordinate range of each data block, and performing grid division on the spatial range of the model in the data pool to generate a basic grid; reading each basic grid data block from the data pool, and calculating the model bearing capacity of each grid; comparing the model bearing capacity of each data block with a specified grid bearing capacity threshold value, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the upper limit of the grid bearing capacity threshold value, and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the grid bearing capacity threshold value until the model bearing capacity of all grids meets the grid bearing capacity threshold value space, so as to obtain the telescopic grids;
disassembling and redistributing the model: endowing a unique identifier and a binding identifier reconstructed by the model monomer information to the model information; the spatial model data is assigned to its corresponding grid cell.
4. A method for slicing spatial model data as recited in claim 3, wherein: the step of dividing the spatial scalable grid is as follows:
generating a basic grid: reading spatial model data in a data pool, calculating the side length of basic grid blocks according to the spatial coordinate range of the model, calculating the geographic coordinate range of each data block according to the side length of the grid blocks, and performing grid division on the spatial range of the model in the data pool according to the geographic coordinate range of the data blocks to generate a basic grid; the data block geographic coordinate range formula is as follows:
XMIN (m,n) =XMIN pool +(m-1)×length grid
XMAX (m,n) =XMIN pool +m×length grid
YMIN (m,n) =YMIN pool +(n-1)×length grid
YMAX (m,n )=YMAX pool +n×length grid
in the formula:
XMIN (m,n) represents the minimum value of the X coordinate of the m-th row and the n-th column grid;
XMAX (m,n) represents the maximum value of the X coordinate of the m-th row and the n-th column grid;
YMIN (m,n) represents the minimum value of Y coordinate of the m-th row and n-th column grids;
YMAX (m,n) represents the maximum value of the Y coordinate of the m-th row and the n-th column grid;
XMIN pool representing the minimum value of X coordinates in the model space coordinate range from four to four in the data pool;
YMIN pool representing the minimum value of the Y coordinate in the model space coordinate range from four to four in the data pool;
carrying out statistics on the bearing capacity of the grid model: reading data blocks in each basic grid from a data pool, reading geometric information and texture information of spatial model information in the data blocks, and calculating model bearing capacity of each grid, wherein the formula of the model bearing capacity is as follows:
Figure FDA0003965264240000031
in the formula:
capacity grid representing the model bearing capacity of the grid;
k represents the number of models within the grid;
length verCoord representing the coordinate length of the model vertex in the data block;
length norCoord representing a model-in-block method of dataLength of line coordinate;
Size float represents the unit storage space occupied by float-type data in a sliced target storage computer system:
length texCoord representing the length of the model texture coordinate in the data block;
n texture representing the number of textures of the model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the storage space occupied by the unit pixel in the slice target storage computer system;
generating a telescopic grid: comparing the model bearing capacity of each data block with a specified grid bearing capacity threshold, carrying out spatial refinement on grid units with the grid model bearing capacity exceeding the grid bearing capacity threshold upper limit, calculating the model bearing capacity of the grid units after the refinement, and carrying out further refinement when the model bearing capacity of the grid units is judged to exceed the specified grid bearing capacity threshold upper limit; and carrying out spatial combination on the grid units with the grid model bearing capacity exceeding the lower limit of the grid bearing capacity threshold, calculating the model bearing capacity of the grid units after combination, and carrying out further combination when judging that the model bearing capacity of the grid units exceeds the lower limit of the specified grid bearing capacity threshold until the model bearing capacity of all the grids meets the grid bearing capacity threshold space, thereby obtaining the telescopic grids.
5. A method for slicing spatial model data as recited in claim 3, wherein: the specific steps of model disassembly and redistribution are as follows:
and generating reconstruction information: endowing the model with a unique identification for model monomer information reconstruction, and binding the identification into the model information;
data retrieval and distribution: and searching the space model in the coordinate range of the grid unit in the data pool, and distributing the space model data to the corresponding grid unit.
6. The method for slicing spatial model data as set forth in claim 1, wherein: the specific steps of the model space matching are as follows:
the origin of the model returns to zero: reading the geometric information of the model from each data block, setting the origin of the model to zero, operating a model transformation matrix according to the information of the origin of the model, operating new vertex coordinates of the model by using the model transformation matrix, and updating the vertex coordinates of the model:
unified model geospatial coordinates: unifying the vertex coordinate information of the models in the data block under the geographic space coordinate to form a unified model geographic space coordinate;
rendering scene space coordinates: converting the model coordinates in the data block into the coordinates of the space reference corresponding to the slice using scene, and updating the model posture; and converting the model vertex position into an actual position in a three-dimensional rendering coordinate system, and updating the coordinates of the model scene.
7. The method for slicing spatial model data as set forth in claim 6, wherein: the method comprises the following specific steps of zeroing the origin of the model;
reading the geometric information of the model: reading the geometric information of the model from each data block, and acquiring the vertex coordinate information and the origin point information of the model:
resetting the origin of the model: zeroing the model origin, and operating a model transformation matrix according to the model origin information before zeroing the model origin; the operation formula of the model transformation matrix is as follows:
Figure FDA0003965264240000041
in the formula:
mat represents a model transformation matrix;
x represents the x coordinate of the model origin before the origin returns to zero;
y represents the origin y coordinate of the model before the origin returns to zero;
z represents the z coordinate of the origin of the model before the origin returns to zero;
updating the space coordinates of the model: and (4) calculating new model vertex coordinates by using the model transformation matrix, and replacing the original model vertex coordinates by using the new model vertex coordinates.
The new model vertex coordinate operation formula is as follows:
Figure FDA0003965264240000042
in the formula:
mat stands for model transformation matrix:
x old ,y old ,z old representing the original vertex coordinates of the model;
x new ,yn ew ,z new representing the new model vertex coordinates of the model.
8. The method for slicing spatial model data as set forth in claim 6, wherein: the method for rendering the spatial coordinates of the scene specifically comprises the following steps:
updating the model posture: converting the model coordinates in the data block into the coordinates of the space reference corresponding to the slice using scene, and updating the position and the rotation angle of the model:
updating the coordinates of the model scene: and converting the model vertex position to an actual position under a three-dimensional rendering coordinate system to obtain a scene coordinate of the model under the three-dimensional rendering coordinate system, and replacing the original model vertex coordinate with the scene coordinate value.
9. The method for slicing spatial model data as set forth in claim 1, wherein: the specific steps for generating the section venation structure are as follows:
generating a sliced venation leaf node: extracting each model information in the data block, obtaining a comparison result of the model data volume and the slice threshold value through an operation formula, circularly disassembling the model until the model data volume meets the slice threshold value, performing multiple times of aggregation operation on the disassembled model block until all the model block is aggregated and grown to obtain a plurality of model aggregates, and storing each model aggregate as a leaf node of the slice venation;
the operation formula for obtaining the model data volume is as follows:
Figure FDA0003965264240000051
in the formula:
Size model representing the amount of model data in the data block:
length verCoord representing the coordinate length of the model vertex in the data block;
length norCoord representing the model normal coordinate length in the data block;
Size float representing the unit storage space occupied by float type data in the slicing target storage computer system;
length texCoord representing the length of the model texture coordinate in the data block;
n texture representing the number of textures of the model in the data block;
width i representing the width of the ith texture picture;
height i representing the height of the ith texture picture;
Size pixel representing the storage space occupied by the unit pixel in the slicing target storage computer system;
generating a sliced venation intermediate node: calculating self-adaptive simplification parameters according to the quantitative visual distance and the characteristics of the model, simplifying the leaf node model of the section in a multi-level manner, and reallocating texture coordinates; simplifying each texture picture in a multi-scale mode, merging the texture pictures of the internal model of the leaf node of the slice, and updating the texture information of the internal model of the slice; selecting a leaf node aggregation initial point of a slice and each leaf level slice to carry out multiple aggregation operations until all leaf level slices are aggregated to obtain a plurality of slice aggregates, and binding the leaf node of the slice venation to a father node of the leaf node of the slice venation according to the related corresponding relation between the leaf node of the slice venation and the middle node of the slice venation obtained by aggregation to enable each middle node of the slice venation to have a corresponding logical relation with a child node;
generating a sliced venation root node: according to the specified simplification degree operation, obtaining a slice deep layer simplification coefficient, and carrying out aggregation simplification on the model triangular points; all the slice venation intermediate nodes in the data block are aggregated into a whole to generate slice venation root nodes, and the slice venation intermediate nodes are bound to father root nodes according to the relevant corresponding relation, so that each slice venation root node and a child node are in a corresponding logical relation.
The deep simplified coefficient operation formula is as follows:
Figure FDA0003965264240000061
in the formula:
n represents the slice depth simplification coefficient;
Size model representing the model data volume;
Size thres representing the upper threshold of the slice root node.
10. The method for slicing spatial model data as set forth in claim 1, wherein: the specific steps of outputting the slice file and the index file are as follows:
and (3) compressing model vertex coordinates: compressing the vertex coordinates of the model in the slice through a compression algorithm, and compressing the floating point type vertex coordinate array into type coordinate data with lower consumption of storage space;
and (3) file compression: compressing the whole slice file through a compression algorithm, and recombining a file data structure;
outputting slice data: storing the geometric information, the texture information and the model monomer information reconstruction identification of the model in the slice into an IO stream, storing the IO stream into a system file, naming the file according to the longitude and latitude and the series of the grid center point corresponding to the slice, and generating a corresponding slice data file;
outputting an index file: reading the corresponding relation of the parents and the children of the slices in each grid to form a relation tree of the parents and the children of the slices of each grid, combining the relation trees of the parents and the children of the slices of each grid to generate a slice index tree, standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a system file.
11. The method for slicing spatial model data as recited in claim 10, wherein: the specific steps of outputting the index file are as follows:
reading the relationship of the slice parent-child nodes: reading the parent-child corresponding relation of the slices in each grid to form a slice parent-child node relation tree corresponding to each grid;
generating a slice index tree: traversing the relation trees of the slice parent-child nodes of each grid, merging the relation trees of the slice parent-child nodes, and generating a slice index tree by combining the stored paths of the slice files;
outputting an index tree: and standardizing the content and the organization form of the slice index tree of the whole data pool, and storing the slice index tree into a system file.
12. A method for slicing spatial model data as recited in claim 2, wherein: the multi-source data includes: and manually making fine model data, oblique photogrammetry data, BIM data, geological data and point cloud data.
CN202211498044.2A 2022-11-26 2022-11-26 Slicing method of space model data Pending CN115719410A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211498044.2A CN115719410A (en) 2022-11-26 2022-11-26 Slicing method of space model data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211498044.2A CN115719410A (en) 2022-11-26 2022-11-26 Slicing method of space model data

Publications (1)

Publication Number Publication Date
CN115719410A true CN115719410A (en) 2023-02-28

Family

ID=85256698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211498044.2A Pending CN115719410A (en) 2022-11-26 2022-11-26 Slicing method of space model data

Country Status (1)

Country Link
CN (1) CN115719410A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958385A (en) * 2023-09-18 2023-10-27 园测信息科技股份有限公司 Material texture dynamic updating method supporting mass monomer models, storage medium and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116958385A (en) * 2023-09-18 2023-10-27 园测信息科技股份有限公司 Material texture dynamic updating method supporting mass monomer models, storage medium and equipment
CN116958385B (en) * 2023-09-18 2023-12-08 园测信息科技股份有限公司 Material texture dynamic updating method supporting mass monomer models, storage medium and equipment

Similar Documents

Publication Publication Date Title
CA2436312C (en) Close-packed, uniformly adjacent, multiresolutional, overlapping spatial data ordering
TWI502547B (en) Method and apparatus for planetary scale object rendering
CN112287138B (en) Organization scheduling method, device and equipment of city information model
CN110321443B (en) Three-dimensional live-action model database construction method and device and data service system
CN106898045A (en) A kind of very three-dimensional geography scene adaptive construction method in big region based on SGOG tile fragments
CN111914047B (en) Geographic entity grid generation method, device and medium based on two-dimension code doorplate
CN113570275A (en) Water resource real-time monitoring system based on BIM and digital elevation model
Beck Real-time visualization of big 3D city models
Rau et al. A cost-effective strategy for multi-scale photo-realistic building modeling and web-based 3-D GIS applications in real estate
CN115719410A (en) Slicing method of space model data
CN114820975B (en) Three-dimensional scene simulation reconstruction system and method based on all-element parameter symbolization
Liu et al. Graphics processing unit-based dynamic volume rendering for typhoons on a virtual globe
Andújar et al. Visualization of Large‐Scale Urban Models through Multi‐Level Relief Impostors
She et al. 3D building model simplification method considering both model mesh and building structure
Nguyen-Gia et al. A comparative survey of 3D GIS models
Zhu et al. CyberCity GIS (CCGIS): integration of DEMs, images, and 3D models
WO2018196214A1 (en) Statistics system and statistics method for geographical influence on vernacular architectural form
CN117408004A (en) Method and system for realizing three-dimensional pipe network dynamic modeling based on vector slicing technology
CN112687007A (en) LOD technology-based stereo grid map generation method
CN116681847A (en) Management and service system for urban three-dimensional geological data
Li Data models for marine and coastal geographic information systems
CN112650792B (en) Method and system for automatically identifying and storing element water flow in urban water flow simulation
Enqing et al. Discussion on construction method of smart campus basic platform based on 3D geographic information technology
CN115937445A (en) Method for generating space model slice data organization structure
Li et al. Research on Landscape Architecture Modeling Simulation System Based on Computer Virtual Reality Technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination