Disclosure of Invention
The invention provides a three-dimensional modeling method, a system and equipment based on GIM data, which can convert complex data relations in the GIM into clear and ordered data structures, and effectively eliminate the influence of insufficient coordinate precision on the accuracy of solid three-dimensional modeling through data weight reduction. By simplifying redundant data node information, the data processing efficiency and the analysis speed are improved, the accuracy and the stability of three-dimensional modeling are further improved, and the reliability performance of the model in various engineering applications is ensured.
In order to solve the above technical problems, an embodiment of the present invention provides a three-dimensional modeling method based on GIM data, including:
Analyzing a GIM file to obtain a reference relation of files among all levels of the GIM file as level information;
Screening the hierarchical information to obtain an MOD file and pose matrix information, and performing coordinate transformation on the MOD file according to the pose matrix information;
reading the MOD file after coordinate conversion to obtain first point information and first line information;
combining the first point information by comprehensively adopting an octree algorithm and a kd tree algorithm to obtain second point information;
Combining the second point information with the first line information, and connecting accurate line segments to obtain second line information;
and establishing a three-dimensional grid model of the entity according to the second line information.
As an improvement of the above solution, the parsing the GIM file, to obtain a reference relationship of files between each level of the GIM file, includes, as level information:
Analyzing the GIM file, and obtaining the reference relation of the file among the CBM level, the DEV level, the PHM level and the MOD level from the GIM file, wherein the reference relation comprises a peer reference relation and a nested reference relation;
and constructing a B-tree data structure according to the reference relation as hierarchy information.
As an improvement of the above solution, the filtering to obtain MOD files and pose matrix information from the hierarchical information, and performing coordinate transformation on the MOD files according to the pose matrix information includes:
screening the hierarchical information to obtain MOD hierarchical files as MOD files;
extracting homogeneous transformation matrixes in each level file from the level information to serve as pose matrix information;
For each node in the MOD hierarchy, inquiring a file of the previous hierarchy of the current hierarchy file by indexing according to the hierarchy information until the file of the highest hierarchy is inquired;
and after the inquiry of any level is completed, carrying out coordinate transformation on the MOD file according to the pose matrix information.
As an improvement of the above solution, the reading the MOD file after coordinate conversion to obtain first point information and first line information includes:
Reading the MOD file after coordinate conversion row by row;
Taking the identified line beginning with P as first point information, and converting point coordinates in the first point information into a vector form;
the identified row beginning with "R" is taken as the first line information.
As an improvement of the above solution, the integrating adopts octree and kd-Tree algorithm, and combines the first point information to obtain second point information, including:
According to the first point information, obtaining three-dimensional space ranges corresponding to all the first point information, and constructing an octree, wherein the three-dimensional space ranges are root nodes of the octree;
Starting from the root node, determining a current node, recursively dividing the current node into eight leaf nodes according to the average value of first point information in the current node until the number of the first point information in the current node is smaller than a preset number threshold or reaches a preset first division depth threshold, and obtaining a depth leaf set;
Constructing a kd tree according to the depth leaf set, and recursively performing binary segmentation on the depth leaf set in a multidimensional space until a preset second segmentation depth threshold is reached;
and carrying out nearest neighbor search on each node of the segmented kd tree, and merging nodes with nearest neighbor search distance smaller than a preset distance threshold value to obtain second point information.
As an improvement of the above solution, the combining the second point information and the first line information, and accurate line segment connection, to obtain second line information, includes:
Reading a start point ID and an end point ID of a line from the first line information;
Searching coordinates and line width information of target points corresponding to the starting point ID and the end point ID in the second point information;
and updating the first line information according to the point coordinates and the line width information to serve as second line information.
As an improvement of the above-described aspect, the retrieving, in the second point information, coordinates and line width information of the target point corresponding to the start point ID and the end point ID includes:
Determining coordinate information of a corresponding candidate point according to the starting point ID and the end point ID;
Matching the coordinate information of the candidate points with the coordinate information of each point in the merging point set of the second point information, and taking the point corresponding to the coordinate information of the candidate points in the second point information as a target point corresponding to the starting point ID and the end point ID when the matching is successful;
and screening the second point information to obtain the coordinate and line width information of the target point.
As an improvement of the above solution, the establishing a three-dimensional grid model of the entity according to the second line information includes:
creating a continuous curved object according to the second line information;
And establishing a three-dimensional grid model of the entity according to the curved surface object.
The embodiment of the invention also provides a three-dimensional modeling system based on GIM data, which comprises:
the hierarchical information acquisition module is used for analyzing the GIM file to obtain the reference relation of the file among all the hierarchies of the GIM file as hierarchical information;
The file screening module is used for screening the MOD file and the pose matrix information from the level information and carrying out coordinate conversion on the MOD file according to the pose matrix information;
the information acquisition module is used for reading the MOD file after coordinate conversion to obtain first point information and first line information;
The point merging module is used for merging the first point information by comprehensively adopting an octree and kd-Tree algorithm to obtain second point information;
the line information updating module is used for combining the second point information with the first line information, and connecting accurate line segments to obtain second line information;
and the modeling module is used for establishing a three-dimensional grid model of the entity according to the second line information.
As an improvement of the above solution, the hierarchical information acquisition module is specifically configured to:
Analyzing the GIM file, and obtaining the reference relation of the file among the CBM level, the DEV level, the PHM level and the MOD level from the GIM file, wherein the reference relation comprises a peer reference relation and a nested reference relation;
and constructing a B-tree data structure according to the reference relation as hierarchy information.
As an improvement of the above solution, the file screening module is specifically configured to:
screening the hierarchical information to obtain MOD hierarchical files as MOD files;
extracting homogeneous transformation matrixes in each level file from the level information to serve as pose matrix information;
For each node in the MOD hierarchy, inquiring a file of the previous hierarchy of the current hierarchy file by indexing according to the hierarchy information until the file of the highest hierarchy is inquired;
and after the inquiry of any level is completed, carrying out coordinate transformation on the MOD file according to the pose matrix information.
As an improvement of the above solution, the information acquisition module is specifically configured to:
Reading the MOD file after coordinate conversion row by row;
Taking the identified line beginning with P as first point information, and converting point coordinates in the first point information into a vector form;
the identified row beginning with "R" is taken as the first line information.
As an improvement of the above solution, the point merging module is specifically configured to:
According to the first point information, obtaining three-dimensional space ranges corresponding to all the first point information, and constructing an octree, wherein the three-dimensional space ranges are root nodes of the octree;
Starting from the root node, determining a current node, recursively dividing the current node into eight leaf nodes according to the average value of first point information in the current node until the number of the first point information in the current node is smaller than a preset number threshold or reaches a preset first division depth threshold, and obtaining a depth leaf set;
Constructing a kd tree according to the depth leaf set, and recursively performing binary segmentation on the depth leaf set in a multidimensional space until a preset second segmentation depth threshold is reached;
and carrying out nearest neighbor search on each node of the segmented kd tree, and merging nodes with nearest neighbor search distance smaller than a preset distance threshold value to obtain second point information.
As an improvement of the above solution, the line information updating module is specifically configured to:
Reading a start point ID and an end point ID of a line from the first line information;
Searching coordinates and line width information of target points corresponding to the starting point ID and the end point ID in the second point information;
and updating the first line information according to the point coordinates and the line width information to serve as second line information.
As an improvement of the above-described aspect, the retrieving, in the second point information, coordinates and line width information of the target point corresponding to the start point ID and the end point ID includes:
Determining coordinate information of a corresponding candidate point according to the starting point ID and the end point ID;
Matching the coordinate information of the candidate points with the coordinate information of each point in the merging point set of the second point information, and taking the point corresponding to the coordinate information of the candidate points in the second point information as a target point corresponding to the starting point ID and the end point ID when the matching is successful;
and screening the second point information to obtain the coordinate and line width information of the target point.
As an improvement of the above solution, the modeling module is specifically configured to:
creating a continuous curved object according to the second line information;
And establishing a three-dimensional grid model of the entity according to the curved surface object.
The embodiment of the invention also provides a three-dimensional modeling device based on GIM data, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the three-dimensional modeling method based on GIM data is realized when the processor executes the computer program.
Compared with the prior art, the three-dimensional modeling method, system and equipment based on GIM data are disclosed, the reference relation of files among all levels of the GIM files is obtained through analyzing the GIM files and is used as level information, MOD files and pose matrix information are obtained through screening from the level information, the MOD files are subjected to coordinate conversion according to the pose matrix information, the MOD files after the coordinate conversion are read to obtain first point information and first line information, an octree and kd tree algorithm is comprehensively adopted to merge the first point information to obtain second point information, the second point information and the first line information are combined, accurate line segment connection is achieved to obtain second line information, and a three-dimensional grid model of an entity is built according to the second line information. By adopting the embodiment of the invention, the complex data relationship in the GIM can be converted into a clear and ordered data structure, and the influence of insufficient coordinate precision on the accuracy of the three-dimensional modeling of the transformer substation can be effectively eliminated.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the specification and claims, it should be understood that the terms first, second, etc. are used solely for the purpose of distinguishing between similar features and not necessarily for the purpose of describing a sequential or chronological order, and not necessarily for the purpose of indicating or implying a relative importance or implicitly indicating the number of features indicated. The terms are interchangeable where appropriate. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature.
The GIM provides a data model containing rich level information, so that related personnel of the power system can share and understand the information of the power system, and the intelligent, automatic and efficient operation of the power system can be realized. When GIM data is processed, the integrity of the data and the accuracy of a model need to be ensured, and the traditional analysis method is difficult to care for large-scale and high-complexity data, so that the problems of data loss or low analysis efficiency are caused.
In addition, because of numerous sources of GIM data, different precision and different projection transformation methods may be adopted when data acquisition is performed, offset of the overlapped coordinate points may occur, serious errors are further caused in the model topology, and especially at the intersection point of a plurality of lines of the tower group, almost all wires cannot be accurately intersected at one point, so that the attractiveness of the model is affected, and the analysis speed of the model is reduced due to redundant node information.
Based on the above considerations, the embodiment of the invention provides a step flow diagram of a three-dimensional modeling method based on GIM data. Referring to fig. 1, in the present embodiment, the three-dimensional modeling method based on GIM data is specifically performed by steps S1 to S6:
S1, analyzing the GIM file to obtain the reference relation of the file among all the layers of the GIM file as the layer information.
Illustratively, the classification of a substation is subdivided into five levels according to its function, partition, and scale size. These levels are, from high to low, the total station level F1 level system (topmost level system), the system/zone level F2 level system (secondary subsystem), the subsystem/sub-zone level F3 level system (tertiary subsystem), the device level F4 level system, and the component level DEV system, respectively. During the storage of the GIM, starting from the start file project. The first five levels of CBM files are nested and invoked sequentially, in order from high to low. The F1 level system is not only associated with multiple IFC models, but also invokes DEV files under the F4 level system. The DEV file can call the DEV file with the same hierarchy and the PHM file. Likewise, the PHM file can call the PHM file of the same hierarchy or the MOD/STL file of the next hierarchy.
It should be noted that, in the GIM file, the CBM file provides information of building height, roof type, layer number, floor area, ownership and the like of the model, and is mainly used for management of building and ownership, and the attribute file of the DEV provides electrical properties of equipment of the power transmission line and defines electrical properties of the equipment in the power system, such as voltage level, wire type, wire split number and the like, mechanical properties and physical properties and mechanical properties describing the equipment, including equipment type, total length, winding type and the like, installation properties and detailed information related to installation and configuration of the equipment, such as model and material of insulators, winded area, hanging point number, wiring point information and the like.
S2, screening the hierarchical information to obtain an MOD file and pose matrix information, and performing coordinate transformation on the MOD file according to the pose matrix information.
It should be noted that pose matrix information is provided in the PHM file, the CBM file, and the DEV file, where the pose matrix information is used to describe a position and a pose of an object in a three-dimensional space, and may be used to determine an absolute spatial position of a reconstructed model in an MOD hierarchy. The efficiency and accuracy of modeling work of the MOD hierarchy can be improved through the obtained hierarchy information in the steps.
S3, reading the MOD file after coordinate conversion to obtain first point information and first line information.
It will be appreciated that to convert text formatted primitives to a three-dimensional model, a deep understanding of the unique geometric characteristics of each primitive is required. In the embodiment of the invention, the geometric characteristics of the primitive are depicted by extracting the point information and the line information of the model, so that an accurate three-dimensional model is further built.
And S4, comprehensively adopting an octree and kd-Tree algorithm, and combining the first point information to obtain second point information.
It can be appreciated that the reasons for the problem of coordinate accuracy in the GIM model file may be various, such as different coordinate systems being adopted, and the loss of coordinate accuracy being caused when the same coordinate system is used for projection transformation, and the difference of measuring equipment or technical accuracy being used in the process of multiple data acquisition being caused. Therefore, the problem of coordinate accuracy is almost an unavoidable problem in the GIM data, and further causes a shift in a large number of coordinate points that should be coincident. According to the embodiment of the invention, the octree and the kd-Tree algorithm are comprehensively adopted to combine the first point information, so that the problem that wiring cannot meet due to coordinate point deviation in the subsequent three-dimensional model building process can be avoided.
S5, combining the second point information with the first line information, and connecting accurate line segments to obtain second line information.
The line information plays an important role in the modeling process, and if the line segments of the line information are not accurately connected, the accuracy and the aesthetic degree of the model are negatively affected, so that the analysis of planning, design, operation and management of a power system is not facilitated. In the embodiment of the invention, the second point information is the combined point information, so that the offset problem of the coordinate point is eliminated, and the line information can be updated by further combining the second point information with the first line information.
And S6, establishing a three-dimensional grid model of the entity according to the second line information.
According to the scheme, the complex data relationship in the GIM can be converted into a clear and ordered data structure by analyzing the GIM file and obtaining the hierarchical information, the point cloud data quantity can be obviously reduced by identifying the geometric characteristics of primitives in the MOD file and performing space segmentation and preliminary merging through an octree algorithm, then the kd tree algorithm is utilized for fine merging, the precision and density of the point cloud data are further improved, a three-dimensional grid model is established according to the obtained second point information and the second line information, the accurate connection of line segments involved in the point correction in the parameter modeling can be realized, the topological error in the graph is effectively corrected, and the precision of the merging result is improved.
As a preferred embodiment, step S1, parsing the GIM file to obtain a reference relationship of each file between the layers of the GIM file, where the reference relationship is used as layer information, specifically:
Analyzing the GIM file, and obtaining the reference relation of the file among the CBM level, the DEV level, the PHM level and the MOD level from the GIM file, wherein the reference relation comprises a peer reference relation and a nested reference relation;
and constructing a B-tree data structure according to the reference relation as hierarchy information.
Referring to FIG. 2, in some embodiments, GIM files have four levels, a CBM level, a DEV level, a PHM level, and a MOD level, respectively, each corresponding to their files. For the CBM level, DEV level and PHM level, it can call not only the next level of files, but also the same level of files. In the process of analyzing the GIM file, a depth-first traversal algorithm is adopted to comprehensively and systematically traverse each data node in the GIM file, and in the traversal process, the hierarchy to which the data node belongs and the reference relation with other files are determined. In addition, each hierarchical file is provided with a property file (FAM file) for storing specific property contents thereof, so that the hierarchical level of the data node can be further determined and verified based on the property file.
It should be noted that B-tree is a self-balancing tree, and is commonly used for index structures of databases and file systems. It can keep data stable and ordered, and its insertion and modification have a relatively average complexity. In the embodiment of the invention, the B-tree data structure is used for storing the hierarchical information of the GIM model, so that the integrity and the order of data can be ensured.
In some embodiments, after step S1, the integrity and accuracy of the parsing is also verified according to the hierarchical information. As the reference relationship among all layers of the GIM file is foreseeable, by adopting a rule-based method, for example, whether the reference relationship of the constructed B tree accords with the preset reference relationship is judged, if so, the integrity and the accuracy are verified to pass, otherwise, the integrity and the accuracy are not verified to pass.
As a preferred embodiment, step S2, screening the hierarchical information to obtain an MOD file and pose matrix information, and performing coordinate transformation on the MOD file according to the pose matrix information, which specifically includes:
screening the hierarchical information to obtain MOD hierarchical files as MOD files;
extracting homogeneous transformation matrixes in each level file from the level information to serve as pose matrix information;
For each node in the MOD hierarchy, inquiring a file of the previous hierarchy of the current hierarchy file by indexing according to the hierarchy information until the file of the highest hierarchy is inquired;
and after the inquiry of any level is completed, carrying out coordinate transformation on the MOD file according to the pose matrix information.
According to the above scheme, according to the hierarchy information, the parent-child tree among the files of each hierarchy can be built from bottom to top from the MOD hierarchy, the MOD hierarchy finds the parent-child tree relation of the previous hierarchy through indexes, and coordinate conversion is performed by using the corresponding matrix, and the whole process is recursively performed until the coordinate conversion operation with the parent-child tree of the highest hierarchy is completed.
Preferably, in step S3, the MOD file after coordinate conversion is read to obtain first point information and first line information, which specifically are:
Reading the MOD file after coordinate conversion row by row;
Taking the identified line beginning with P as first point information, and converting point coordinates in the first point information into a vector form;
the identified row beginning with "R" is taken as the first line information.
In some embodiments, the coordinates of the first point information are converted to numpy. The advantage of converting the information coordinates into numpy array in the memory aspect is mainly reflected in the memory efficiency and the calculation efficiency by converting the first point information coordinates into numpy. The numpy arrays optimize the utilization of the memory space in a continuous storage mode, and compared with a common Python list, fewer memories can be used for storing the same amount of data so as to achieve the purpose of simplifying the data.
It should be noted that, by converting the point coordinates of the first point information into a vector form, a large amount of point coordinate data can be rapidly and accurately processed, and a complicated process of processing data elements one by one is avoided, so that the calculation speed is greatly improved, and powerful support is provided for subsequent point merging and model optimization.
In a preferred embodiment, step S4, a combination of octree and kd-tree algorithm is adopted to combine the first point information to obtain second point information, specifically:
According to the first point information, obtaining three-dimensional space ranges corresponding to all the first point information, and constructing an octree, wherein the three-dimensional space ranges are root nodes of the octree;
Starting from the root node, determining a current node, recursively dividing the current node into eight leaf nodes according to the average value of first point information in the current node until the number of the first point information in the current node is smaller than a preset number threshold or reaches a preset first division depth threshold, and obtaining a depth leaf set;
Constructing a kd tree according to the depth leaf set, and recursively performing binary segmentation on the depth leaf set in a multidimensional space until a preset second segmentation depth threshold is reached;
and carrying out nearest neighbor search on each node of the segmented kd tree, and merging nodes with nearest neighbor search distance smaller than a preset distance threshold value to obtain second point information.
In order to facilitate the subsequent updating of the line information, the second point information includes information of each point in the merging point set, but it is understood that it is not necessary to store all information of each point, and only part of information that can be used to identify the point may be stored. Such as ID and/or point coordinates, etc.
In the scheme, the first point information is optimized by adopting the octree algorithm, the space segmentation and the preliminary merging are carried out, the data quantity of the first point can be obviously reduced, and the kd-Tree algorithm is utilized for fine merging, so that the precision and the density of the point cloud data are further improved. By adopting the embodiment of the invention, the influence of insufficient coordinate precision on the accuracy of the three-dimensional modeling of the transformer substation can be effectively eliminated, the precision of the merging result is improved, and finally the obtained second point information is further simplified.
Preferably, step S5, combining the second point information with the first line information, and connecting accurate line segments to obtain second line information, includes:
Reading a start point ID and an end point ID of a line from the first line information;
Searching coordinates and line width information of target points corresponding to the starting point ID and the end point ID in the second point information;
and updating the first line information according to the point coordinates and the line width information to serve as second line information.
Still further, preferably, the retrieving, in the second point information, coordinates and line width information of the target point corresponding to the start point ID and the end point ID includes:
Determining coordinate information of a corresponding candidate point according to the starting point ID and the end point ID;
Matching the coordinate information of the candidate points with the coordinate information of each point in the merging point set of the second point information, and taking the point corresponding to the coordinate information of the candidate points in the second point information as a target point corresponding to the starting point ID and the end point ID when the matching is successful;
and screening the second point information to obtain the coordinate and line width information of the target point.
In the above solution, the starting point and the end point in the first line information correspond to the first point information, but the first point information is not accurate enough, so that the coordinate position of the second point information obtained after the merging may not be the same as any point in the merging point set, and if the target points corresponding to the starting point ID and the end point ID are directly searched in the second point information, a search error may occur. By adopting the embodiment of the invention, the accurate connection of the line segments involved in the midpoint correction in the parameter modeling is realized, the topology error in the graph is effectively corrected, and the precision of the merging result is improved.
As a preferred embodiment, the building a three-dimensional grid model of the entity according to the second line information includes:
creating a continuous curved object according to the second line information;
And establishing a three-dimensional grid model of the entity according to the curved surface object.
In the scheme, the curved surface object is created by using the line segments, the combined points and lines are successfully converted into continuous and visualized curved surfaces, the structure and the details of the model are clearly shown, and higher precision and richer expression forms are provided for the visualization of the model.
By identifying the geometric characteristics of primitives in the MOD file and combining adjacent points, a three-dimensional grid model is built according to the obtained second point information and the second line information, accurate connection of line segments involved in point correction in parameter modeling can be achieved, topological errors in graphs are effectively corrected, accuracy of combining results is improved, and influence of insufficient coordinate accuracy on accuracy of three-dimensional modeling of a transformer substation is effectively eliminated.
Referring to fig. 3, an embodiment of the present invention provides a schematic structural diagram of a three-dimensional modeling system based on GIM data. The three-dimensional modeling system based on the GIM data comprises a hierarchical information acquisition module 11, a file screening module 12, an information acquisition module 13, a point merging module 14, a line information updating module 15 and a modeling module 16, wherein:
The hierarchical information acquisition module 11 is used for analyzing the GIM file to obtain the reference relation of the file among all the hierarchies of the GIM file as hierarchical information;
The file screening module 12 is configured to screen the hierarchical information to obtain an MOD file and pose matrix information, and perform coordinate transformation on the MOD file according to the pose matrix information;
an information obtaining module 13, configured to read the MOD file after coordinate conversion to obtain first point information and first line information;
a point merging module 14, configured to combine the first point information to obtain second point information by comprehensively adopting an octree and kd-Tree algorithm;
the line information updating module 15 is configured to combine the second point information and the first line information, and connect accurate line segments to obtain second line information;
The modeling module 16 is configured to build a three-dimensional grid model of the entity according to the second line information.
As a preferred embodiment, the hierarchical information obtaining module 11 is specifically configured to:
Analyzing the GIM file, and obtaining the reference relation of the file among the CBM level, the DEV level, the PHM level and the MOD level from the GIM file, wherein the reference relation comprises a peer reference relation and a nested reference relation;
and constructing a B-tree data structure according to the reference relation as hierarchy information.
As a preferred embodiment, the file screening module 12 is specifically configured to:
screening the hierarchical information to obtain MOD hierarchical files as MOD files;
extracting homogeneous transformation matrixes in each level file from the level information to serve as pose matrix information;
For each node in the MOD hierarchy, inquiring a file of the previous hierarchy of the current hierarchy file by indexing according to the hierarchy information until the file of the highest hierarchy is inquired;
and after the inquiry of any level is completed, carrying out coordinate transformation on the MOD file according to the pose matrix information.
As a preferred embodiment, the information obtaining module 13 is specifically configured to:
Reading the MOD file after coordinate conversion row by row;
Taking the identified line beginning with P as first point information, and converting point coordinates in the first point information into a vector form;
the identified row beginning with "R" is taken as the first line information.
As a preferred embodiment, the point combining module 14 is specifically configured to:
According to the first point information, obtaining three-dimensional space ranges corresponding to all the first point information, and constructing an octree, wherein the three-dimensional space ranges are root nodes of the octree;
Starting from the root node, determining a current node, recursively dividing the current node into eight leaf nodes according to the average value of first point information in the current node until the number of the first point information in the current node is smaller than a preset number threshold or reaches a preset first division depth threshold, and obtaining a depth leaf set;
Constructing a kd tree according to the depth leaf set, and recursively performing binary segmentation on the depth leaf set in a multidimensional space until a preset second segmentation depth threshold is reached;
and carrying out nearest neighbor search on each node of the segmented kd tree, and merging nodes with nearest neighbor search distance smaller than a preset distance threshold value to obtain second point information.
As a preferred embodiment, the line information updating module 15 is specifically configured to:
Reading a start point ID and an end point ID of a line from the first line information;
Searching coordinates and line width information of target points corresponding to the starting point ID and the end point ID in the second point information;
and updating the first line information according to the point coordinates and the line width information to serve as second line information.
Further, preferably, the retrieving, in the second point information, coordinates and line width information of the target point corresponding to the start point ID and the end point ID includes:
Determining coordinate information of a corresponding candidate point according to the starting point ID and the end point ID;
Matching the coordinate information of the candidate points with the coordinate information of each point in the merging point set of the second point information, and taking the point corresponding to the coordinate information of the candidate points in the second point information as a target point corresponding to the starting point ID and the end point ID when the matching is successful;
and screening the second point information to obtain the coordinate and line width information of the target point.
As a preferred embodiment, the modeling module 16 is specifically configured to:
creating a continuous curved object according to the second line information;
And establishing a three-dimensional grid model of the entity according to the curved surface object.
The three-dimensional modeling system based on the GIM data can convert complex data relations in the GIM into clear and ordered data structures by analyzing the GIM file and obtaining the hierarchical information, remarkably reduces the amount of point cloud data by identifying the geometric characteristics of primitives in the MOD file and performing space segmentation and preliminary merging through an octree algorithm, further improves the precision and density of the point cloud data by using a kd tree algorithm, establishes a three-dimensional grid model according to the obtained second point information and second line information, can realize accurate connection of line segments involved in midpoint correction of parameter modeling, effectively corrects topological errors in the graph, improves the precision of merging results, and effectively eliminates the influence of insufficient coordinate precision on the accuracy of three-dimensional modeling of a transformer substation.
The embodiment of the invention also provides a three-dimensional modeling device based on GIM data, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the three-dimensional modeling method based on the GIM data is realized when the processor executes the computer program, and the working principles and beneficial effects of the three-dimensional modeling device based on the GIM data are in one-to-one correspondence, so that the description is omitted.
The present invention may take the form of a computer program product embodied on one or more storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) having program code embodied therein. Computer-readable storage media include both non-transitory and non-transitory, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device.
It is to be understood that the embodiments of the application are not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of embodiments of the application is limited only by the appended claims.
The above examples merely represent a few implementations of the present examples, which are described in more detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that various modifications and improvements can be made to the present application without departing from the spirit of the embodiments of the application.