Urban underground pipe network modeling method and device and computer readable storage medium
Through the analysis of Shp files and the construction of three-dimensional models, the three-dimensional model of the urban underground pipe network is automatically constructed, which solves the problems of low modeling efficiency and insufficient accuracy in the existing technology, and achieves efficient and accurate three-dimensional modeling.
Patent Information
- Application Number
- CN202410688768.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-03
AI Technical Summary
Existing urban underground pipe network modeling methods have problems such as high labor and time costs, low efficiency, and low modeling accuracy.
By parsing the Shp file, the geometric information and field information of the pipe segment and pipe points are obtained, the cross-sectional geometric center point and normal vector of the pipe segment are calculated, the pipe segment and the three-dimensional model are constructed, and combined with the data of the casing, well chamber and manhole cover, the system automatically Construct a three-dimensional model of the urban underground pipe network.
It achieves automatic conversion from two-dimensional data to three-dimensional models, simplifies the modeling process, reduces labor and time costs, and improves modeling efficiency and accuracy.
Smart Images

Figure CN118586137A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional model construction, and in particular to a method and device for modeling an urban underground pipe network, and a computer-readable storage medium. Background Art
[0002] Shapfile (Shp) data is a vector data format used in geographic information systems that can describe the geometry and attributes of geographic spatial objects. In the representation of underground pipelines, Shp data is usually used to store and represent the spatial location and attribute information of pipelines, such as the starting point, end point, length, material and diameter of the pipeline, so that data can be imported, exported, edited and analyzed more conveniently based on this information, providing strong support for the planning, design, construction and management process of underground pipeline network construction.
[0003] However, due to the huge scale of urban underground pipe networks, traditional pipe network data management methods face problems such as low efficiency and untimely accident handling. Digital twin technology provides a new visualization for intelligent management of underground pipe networks and builds a smart pipe network management window that integrates detection, early warning, diagnosis and analysis. However, the Shp data of underground pipe networks presents two-dimensional lines when visualized, which can only show the plane form of pipe network data, but cannot show the three-dimensional structure of the pipe network, and cannot fully express the spatial relationship between different pipes in the underground pipe network, resulting in the inability to understand and analyze the layout of the underground pipe network, and it is impossible to carry out pipe network planning and geological exploration based on two-dimensional lines. Therefore, it is necessary to use three-dimensional visualization technology to display the three-dimensional structure and spatial relationship of the underground pipe network.
[0004] Most of the pipe network modeling methods in the prior art are manual modeling, which requires first obtaining a two-dimensional drawing of the underground pipeline based on Shp data, and then manually drawing it on a three-dimensional modeling software according to the two-dimensional drawing of the underground pipeline. The staff needs to carefully study the two-dimensional drawing, understand the relationship between each pipe segment and pipe point, and then draw each pipe segment and pipe point in the pipe network one by one in combination with the size information of each pipe segment and pipe point, as well as the connection relationship between the pipe segments and pipe points in the drawing, so as to obtain a three-dimensional model of the underground pipe network; however, when it is necessary to construct a three-dimensional model of the entire urban underground pipe network, due to the large number of pipe segments and pipe points in the pipe network, the manual modeling method based on the two-dimensional drawing requires huge manpower and time costs, and is inefficient. In addition, the two-dimensional drawing of the entire urban underground pipe network is relatively complex, and the connection relationship may be misunderstood during the manual modeling process, resulting in low modeling accuracy. Summary of the invention
[0005] To this end, the technical problem to be solved by the present invention is to overcome the problems of high manpower and time costs, low efficiency and low modeling accuracy in the urban underground pipe network modeling method in the prior art.
[0006] In order to solve the above technical problems, the present invention provides a method for modeling an urban underground pipe network, comprising:
[0007] Parse the shapfile file of the pipe network to obtain the geometric information and field information of the pipe network, and obtain the connection relationship between each pipe segment and pipe point based on the geometric information and the field information;
[0008] Based on the radius, wall thickness and two-dimensional coordinates of each pipe segment, the coordinates of the geometric center points of the cross sections at both ends of each pipe segment are obtained; based on the angle between each pipe segment and the pipe segments connected to it, the normal vectors of the cross sections at both ends of each pipe segment are obtained; based on the normal vectors, geometric center point coordinates and radius of each cross section of the pipe segment, the three-dimensional model of each cross section of the pipe segment is obtained; based on the three-dimensional models of the cross sections at both ends of each pipe segment, the three-dimensional model of each pipe segment is obtained;
[0009] Based on the two-dimensional coordinates of the connection points of multiple pipe sections connected to the sleeve, the starting point coordinates, the middle point coordinates and the end point coordinates of the sleeve are obtained, thereby obtaining the axis of the sleeve; calculating the vertex coordinates of the cross section where the m sampling points on the axis are located, obtaining the three-dimensional model of the cross section where each sampling point is located, and obtaining the three-dimensional model of the sleeve based on the three-dimensional model of the cross section where the m sampling points are located;
[0010] A three-dimensional model of the pipe well is constructed based on the well chamber radius, well chamber wall thickness, two-dimensional coordinates of both ends of the well chamber, well neck radius, well neck wall thickness, two-dimensional coordinates of both ends of the well neck, and preset well cover thickness;
[0011] Based on the 3D models of all pipe sections, all sleeves, all pipe wells and all accessories in the pipe network, a 3D model of the urban underground pipe network is obtained.
[0012] Preferably, if the sleeve is a common sleeve, the coordinates of the middle point of the sleeve are obtained based on the two-dimensional coordinates of the connection points of the two pipe sections connected to the sleeve;
[0013] The coordinates of the intermediate point are translated by a preset distance along the axis direction of the two pipe sections to obtain the coordinates of the starting point and the end point of the sleeve;
[0014] The starting point coordinates, the middle point coordinates and the end point coordinates are connected to obtain the axis of the sleeve.
[0015] Preferably, if the sleeve is a multi-pass sleeve, the coordinates of the middle point of the sleeve are obtained based on the two-dimensional coordinates of the connection points of the two pipe sections with the largest pipe diameters connected to the sleeve;
[0016] The coordinates of the intermediate point are translated by a preset distance along the axis direction of the two pipe sections with the largest pipe diameters to obtain the coordinates of the starting point and the end point of the sleeve;
[0017] The starting point coordinates, the middle point coordinates and the end point coordinates are connected to obtain the axis of the sleeve.
[0018] Preferably, the calculation formula for the vertex coordinates on the cross section where the sampling point is located is:
[0019]
[0020] Among them, p i represents the vertex coordinates of the i-th sampling point on the axis on the cross section, p i-1 Indicates the vertex coordinates of the i-1th sampling point on the axis on the cross section, M is the preset parameter, Represents the normal vector of the cross section where the i-th sampling point on the axis is located, p c Indicates the coordinates of the middle point of the sleeve, p c-1 Indicates the starting point coordinates of the sleeve.
[0021] Preferably, based on the well chamber radius, the well chamber wall thickness, the two-dimensional coordinates of the two ends of the well chamber, the well neck radius, the well neck wall thickness, the two-dimensional coordinates of the two ends of the well neck and the preset well cover thickness, constructing the three-dimensional model of the pipe well includes:
[0022] Based on the radius and wall thickness of the well chamber and the two-dimensional coordinates of the two ends of the well chamber, the coordinates of the geometric center points of the cross sections at the two ends of the well chamber are obtained;
[0023] Based on the radius of the well chamber and the coordinates of the geometric center points of the cross sections at both ends, a three-dimensional model of the cross sections at both ends of the well chamber is obtained; based on the three-dimensional model of the cross sections at both ends of the well chamber, a three-dimensional model of the well chamber is obtained;
[0024] Based on the radius and wall thickness of the well neck and the two-dimensional coordinates of the two ends of the well neck, the coordinates of the geometric center points of the cross sections at the two ends of the well neck are obtained;
[0025] Based on the radius of the well neck and the coordinates of the geometric center points of the cross sections at both ends, a three-dimensional model of the cross sections at both ends of the well neck is obtained; based on the three-dimensional model of the cross sections at both ends of the well neck, a three-dimensional model of the well neck is obtained;
[0026] Based on the radius and preset thickness of the well neck, a three-dimensional model of a manhole cover having the same shape and matching size as the well neck is generated;
[0027] The side surface of the well chamber three-dimensional model, the side surface of the well neck three-dimensional model and the top surface of the well cover three-dimensional model are texture mapped, and the pipe well three-dimensional model is obtained based on the mapped well chamber three-dimensional model, well neck three-dimensional model and well cover three-dimensional model.
[0028] Preferably, if the pipe well is a rainwater grate or an electric power well, the two cross-sectional geometric center points farthest from the pipe well among all pipe sections connected to the pipe well are obtained;
[0029] The rotation angle of the three-dimensional model of the pipe well is calculated based on the two cross-sectional geometric center points, and the three-dimensional model of the pipe well is rotated around the z-axis based on the rotation angle of the three-dimensional model of the pipe well.
[0030] Preferably, the calculation formula for the rotation angle of the three-dimensional model of the pipe well is:
[0031]
[0032] Among them, θ represents the rotation angle of the three-dimensional model of the tube well, represents the vector formed by the two cross-section geometric center points p1 and p2 that are farthest from the tube well, Representation vector The model, represents the positive x-axis of the coordinate system, and T represents transpose.
[0033] Preferably, it also includes:
[0034] Determine whether the elevation field values of the plurality of pipe segments connected to the appendage three-dimensional model and one end of the appendage three-dimensional model are the same as the elevation field value of the appendage three-dimensional model;
[0035] If the elevation field values of the plurality of pipe segments connected to the appendage 3D model close to one end of the appendage 3D model are different from the elevation field value of the appendage 3D model, it is determined that the appendage 3D model is suspended;
[0036] The geometric center point at the bottom of the three-dimensional model of the appendage and a plurality of pipe segment connection points are used as endpoints to generate a three-dimensional model of the connecting pipe, thereby preventing the three-dimensional model of the appendage from being suspended in the air.
[0037] The present invention also provides a device for modeling an urban underground pipe network, comprising:
[0038] A data parsing module is used to parse the shapfile file of the pipe network to obtain the geometric information and field information of the pipe network, and obtain the connection relationship between each pipe segment and pipe point based on the geometric information and the field information;
[0039] The three-dimensional model building module of the pipe segment is used to obtain the coordinates of the geometric center points of the cross sections at both ends of each pipe segment based on the radius, wall thickness and two-dimensional coordinates of the two ends of each pipe segment; obtain the normal vectors of the cross sections at both ends of each pipe segment based on the angle between each pipe segment and the pipe segments connected to it; obtain the three-dimensional model of each cross section of the pipe segment based on the normal vector, geometric center point coordinates and radius of each cross section of the pipe segment; obtain the three-dimensional model of each pipe segment based on the three-dimensional models of the cross sections at both ends of each pipe segment;
[0040] A sleeve three-dimensional model building module is used to obtain the starting point coordinates, the middle point coordinates and the end point coordinates of the sleeve based on the two-dimensional coordinates of the connection points of multiple pipe sections connected to the sleeve, so as to obtain the axis of the sleeve; calculate the vertex coordinates of the cross section where the m sampling points on the axis are located, obtain the three-dimensional model of the cross section where each sampling point is located, and obtain the three-dimensional model of the sleeve based on the three-dimensional model of the cross section where the m sampling points are located;
[0041] A tube well three-dimensional model building module is used to build a tube well three-dimensional model based on the well chamber radius, well chamber wall thickness, two-dimensional coordinates of both ends of the well chamber, well neck radius, well neck wall thickness, two-dimensional coordinates of both ends of the well neck, and preset well cover thickness;
[0042] The urban underground pipe network 3D model acquisition module is used to obtain the urban underground pipe network 3D model based on the 3D models of all pipe sections, all sleeves, all pipe wells and all accessories in the pipe network.
[0043] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned urban underground pipe network modeling method are implemented.
[0044] The urban underground pipe network modeling method provided by the present application directly parses the shapfile file to obtain the modeling position, type, size information of the pipe segments and pipe points and the connection relationship between the pipe segments and pipe points; the cross-sectional center points at both ends of the pipe segments are obtained through the radius of the pipe segments, the wall thickness and the two-dimensional coordinates of the two ends of the pipe segments, and then based on the angle between the pipe segments and the connected pipe segments, the normal vectors of the cross sections at both ends of the pipe segments are obtained, and the three-dimensional model of the cross section is obtained based on the coordinates of the center point of the cross section and the normal vector, thereby obtaining the three-dimensional model of the pipe segment based on the three-dimensional model of the cross sections at both ends of the pipe segments; the starting point, middle point and end point coordinates of the sleeve are obtained based on the multiple pipe segment connection points connected to the sleeve, thereby obtaining the axis of the sleeve, and through the axis A three-dimensional model of the cross section of m sampling points is constructed to obtain a three-dimensional model of the sleeve; then a three-dimensional model of the pipe well is constructed based on the two-dimensional data information of the well chamber, well neck and well cover; finally, a three-dimensional model of the urban underground pipe network is obtained based on the constructed three-dimensional model of the pipe segment, the three-dimensional model of the sleeve, the three-dimensional model of the pipe well and the three-dimensional model of the accessories; the modeling method provided in the present application can realize the automatic conversion of two-dimensional data into a three-dimensional model, and directly construct a three-dimensional model of the urban underground pipe network based on the shapfile file, without the need to first draw a two-dimensional drawing of the pipe network, and then manually draw the three-dimensional models of each pipe segment and pipe point based on the two-dimensional drawing and the pipe segment and pipe point dimensions, which simplifies the modeling process, reduces manpower and time costs, and improves modeling efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0046] Figure 1 Flow chart of the urban underground pipe network modeling method provided for this application;
[0047] Figure 2 A schematic diagram of the principle of obtaining the normal vector of the cross section at both ends of the pipe segment provided in this application;
[0048] Figure 3 A schematic cross-sectional view of the sampling points of the sleeve axis provided in this application;
[0049] Figure 4 This is a schematic diagram of the structure of the urban underground pipe network modeling device provided in this application. DETAILED DESCRIPTION
[0050] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0051] See also Figure 1 , Figure 1The urban underground pipe network modeling method provided in this application specifically includes:
[0052] S10: parsing the shapfile file of the pipe network to obtain geometric information and field information of the pipe network, and obtaining the connection relationship between each pipe segment and pipe point based on the geometric information and field information;
[0053] Specifically, the geometric information includes the modeling location of each pipe segment and pipe point in the pipe network, and the field information includes the type and size of each pipe segment and pipe point in the pipe network;
[0054] For example, the modeling position of the pipe segment is the two-dimensional coordinates of the two ends of the pipe segment, and the size of the pipe segment includes the radius and wall thickness of the pipe segment; the modeling position of the pipe point is the two-dimensional coordinates of the pipe point, and the types of the pipe point include sleeves, pipe wells, and accessories. When the pipe point is a pipe well, the modeling position of the pipe point includes the two-dimensional coordinates of the two ends of the well chamber and the two-dimensional coordinates of the two ends of the well neck, and the size of the pipe point includes the well chamber radius, the well chamber wall thickness, the well neck radius, and the well neck wall thickness;
[0055] S20: based on the radius, wall thickness and two-dimensional coordinates of each pipe segment at both ends of the pipe segment, obtain the coordinates of the geometric center points of the cross sections at both ends of each pipe segment; based on the angle between each pipe segment and the pipe segments connected to it, obtain the normal vectors of the cross sections at both ends of each pipe segment; based on the normal vectors of each cross section of the pipe segment, the coordinates of the geometric center points and the radius of the pipe segment, obtain the three-dimensional model of each cross section of the pipe segment; based on the three-dimensional models of the cross sections at both ends of each pipe segment, obtain the three-dimensional model of each pipe segment;
[0056] S30: based on the two-dimensional coordinates of the connection points of the multiple pipe segments connected to the sleeve, the starting point coordinates, the middle point coordinates and the end point coordinates of the sleeve are obtained, thereby obtaining the axis of the sleeve; calculating the vertex coordinates of the cross section where the m sampling points on the axis are located, obtaining the three-dimensional model of the cross section where each sampling point is located, and obtaining the three-dimensional model of the sleeve based on the three-dimensional model of the cross section where the m sampling points are located;
[0057] S40: constructing a three-dimensional model of the pipe well based on the well chamber radius, the well chamber wall thickness, the two-dimensional coordinates of the two ends of the well chamber, the well neck radius, the well neck wall thickness, the two-dimensional coordinates of the two ends of the well neck, and the preset well cover thickness;
[0058] S50: Based on the three-dimensional models of all pipe sections, all sleeves, all pipe wells and all appendages in the pipe network, a three-dimensional model of the urban underground pipe network is obtained.
[0059] Specifically, the three-dimensional model of the appendage is an existing model and can be directly read based on the type of the appendage without being constructed.
[0060] The urban underground pipe network modeling method provided in the present application directly parses the ahapefile file to obtain the location information, type, size information of the pipe segments and pipe points, as well as the connection relationship between each pipe segment and pipe point; then, based on the above two-dimensional data information and the connection relationship, the pipe segment three-dimensional model, the sleeve three-dimensional model and the pipe well three-dimensional model are respectively constructed, so as to obtain the urban underground pipe network three-dimensional model based on the pipe segment three-dimensional model, the sleeve three-dimensional model, the pipe well three-dimensional model and the accessory three-dimensional model, so as to accurately reflect the characteristics of the original data and enhance the visualization effect; not only the conversion of two-dimensional data to three-dimensional model is realized, but also there is no need to first draw a two-dimensional drawing based on the two-dimensional data, and then manually analyze the connection relationship between the pipe segments and pipe points based on the two-dimensional drawing, so as to draw the three-dimensional model of each pipe segment and pipe point one by one, which simplifies the modeling process and improves the modeling efficiency. In addition, since there is no need to manually analyze the connection relationship between each pipe segment and pipe point during the modeling process, the reduction of modeling accuracy caused by manual operation errors is avoided.
[0061] Optionally, in some embodiments of the present application, the coordinates of the cross-sectional geometric center points of the connecting ends of connected pipe segments should be equal. If the calculated coordinates of the cross-sectional geometric center points of multiple connected pipe segment connecting segments are inconsistent, corrections can be made within the allowable error range to ensure the accuracy of the constructed three-dimensional model.
[0062] Specifically, Figure 2 As shown, the principle of obtaining the normal vector of the cross section at both ends of the pipe segment in step S20 is: assuming that a in the figure is a two-dimensional schematic diagram of the pipe segment, b is a two-dimensional schematic diagram of the pipe segment connected to pipe segment a, where a1 and a2 are the endpoints at both ends of pipe segment a, b1 and b2 are the endpoints at both ends of pipe segment b, then the vector Vector Translate to a2, vector That is the normal vector of the cross section where a2 is located.
[0063] Specifically, the sleeve can be divided into a common sleeve and a multi-pass sleeve according to the number of connected pipe sections. The common sleeve is suitable for connecting two pipe sections and the angle between the pipe sections is greater than 150 degrees, and its axis is composed of a starting point, an intermediate point and an end point; while for a multi-pass sleeve, the two pipe sections with the largest diameters among the multiple pipe sections connected to it can be used as the main pipes. If the maximum pipe diameter is not unique, the two pipe sections with the largest angle are selected as the main pipes, and the axis of the multi-pass sleeve is obtained through the two main pipes.
[0064] Specifically, when the sleeve is a common sleeve, the steps of obtaining the axis thereof include:
[0065] The coordinates of the middle point of the sleeve are obtained based on the two-dimensional coordinates of the connection points of the two pipe sections connected to the sleeve;
[0066] The coordinates of the middle point are translated along the axis direction of the two pipe sections by a preset distance to obtain the starting point coordinates and the end point coordinates of the sleeve;
[0067] In a specific embodiment of the present application, the preset distance is 1 m. In other embodiments, if the preset distance is greater than 1 / 2 of the length of the pipe section, 1 / 2 of the length of the pipe section is taken as the preset distance.
[0068] Connect the starting point coordinates, the middle point coordinates and the end point coordinates to obtain the axis of the sleeve.
[0069] Specifically, when the sleeve is a multi-pass sleeve, the steps of obtaining the axis thereof include:
[0070] The coordinates of the middle point of the sleeve are obtained based on the two-dimensional coordinates of the connection points of the two pipe sections with the largest diameters connected to the sleeve;
[0071] The coordinates of the middle point are translated by a preset distance along the axis direction of the two pipe sections with the largest pipe diameters to obtain the starting point coordinates and the end point coordinates of the sleeve;
[0072] Connect the starting point coordinates, the middle point coordinates and the end point coordinates to obtain the axis of the sleeve.
[0073] Furthermore, if Figure 3 The figure shows a schematic diagram of the cross section of the sampling point on the sleeve axis provided by the present application. The calculation formula of the vertex coordinates on the cross section where the sampling point is located in step S20 is:
[0074]
[0075] Among them, p i represents the vertex coordinates of the i-th sampling point on the axis on the cross section, p i-1 Indicates the vertex coordinates of the i-1th sampling point on the axis on the cross section, M is a preset parameter, Represents the normal vector of the cross section where the i-th sampling point on the axis is located, p c Indicates the coordinates of the middle point of the sleeve, p c-1 Indicates the starting point coordinates of the sleeve.
[0076] Specifically, the cross section where the sampling point is located is the cross section perpendicular to the sleeve axis. When i=1, p i-1 It is the vertex coordinate of the sleeve starting point on the cross section perpendicular to the sleeve axis. Since the cross section where the sleeve starting point is located is connected to the pipe section, the coordinates of any vertex on the cross section of the pipe section close to one end of the sleeve can be used as the vertex coordinates on the cross section where the sleeve starting point is located; in a specific embodiment of the present application, the value of M is greater than 1000.
[0077] Specifically, the pipe well is composed of a well chamber, a well neck and a well cover, so the 3D model of the pipe well is composed of the 3D model of the well chamber, the 3D model of the well neck and the 3D model of the well cover, and the shapes of the well chamber, the well neck and the well cover are similar to the pipe section, so their modeling process is the same as the modeling process of the pipe section;
[0078] Specifically, in step S30, based on the well chamber radius, the well chamber wall thickness, the two-dimensional coordinates of the two ends of the well chamber, the well neck radius, the well neck wall thickness, the two-dimensional coordinates of the two ends of the well neck, and the preset well cover thickness, constructing the three-dimensional model of the pipe well includes:
[0079] S300: based on the radius and wall thickness of the well chamber and the two-dimensional coordinates of the two ends of the well chamber, obtaining the coordinates of the geometric center points of the cross sections at the two ends of the well chamber;
[0080] S301: based on the radius of the well chamber and the coordinates of the geometric center points of the cross sections at both ends, obtain the three-dimensional models of the cross sections at both ends of the well chamber, and based on the three-dimensional models of the cross sections at both ends of the well chamber, obtain the three-dimensional model of the well chamber;
[0081] S302: based on the radius and wall thickness of the well neck and the two-dimensional coordinates of the two ends of the well neck, obtaining the coordinates of the geometric center points of the cross sections at the two ends of the well neck;
[0082] S303: based on the radius of the well neck and the coordinates of the geometric center points of the cross sections at both ends, obtain the three-dimensional models of the cross sections at both ends of the well neck, and based on the three-dimensional models of the cross sections at both ends of the well neck, obtain the three-dimensional model of the well neck;
[0083] S304: Based on the radius and preset thickness of the well neck, a three-dimensional model of the manhole cover having the same shape and matching size as the well neck is generated;
[0084] S305: Texture mapping is performed on the side surface of the well chamber 3D model, the side surface of the well neck 3D model and the top surface of the well cover 3D model, and a pipe well 3D model is obtained based on the mapped well chamber 3D model, well neck 3D model and well cover 3D model.
[0085] Preferably, if the pipe well is a rainwater grate or an electric power well, the two cross-sectional geometric center points farthest from the pipe well among all pipe sections connected to the pipe well are obtained;
[0086] Calculating the rotation angle of the three-dimensional model of the pipe well based on the two cross-section geometric center points, and rotating the three-dimensional model of the pipe well around the z-axis based on the rotation angle of the three-dimensional model of the pipe well;
[0087] Specifically, the calculation formula for the rotation angle of the tube well three-dimensional model is:
[0088]
[0089] Among them, θ represents the rotation angle of the three-dimensional model of the tube well, Represents the vector formed by the two cross-section geometric center points p1 and p2 that are farthest from the tube well, Representation vector The model, represents the positive x-axis of the coordinate system, and T represents transpose.
[0090] Preferably, in some embodiments of the present application, step S50 further includes:
[0091] Determine whether the elevation field values of the multiple pipe segments connected to the appendage 3D model and one end of the appendage 3D model close to the appendage 3D model are the same as the elevation field value of the appendage 3D model;
[0092] If the elevation field values of the multiple pipe segments connected to the appendage 3D model close to one end of the appendage 3D model are different from the elevation field value of the appendage 3D model, it is determined that the appendage 3D model is suspended;
[0093] The geometric center point at the bottom of the three-dimensional model of the appendage and multiple pipe segment connection points are used as endpoints to generate a three-dimensional model of the connecting pipe, thereby preventing the three-dimensional model of the appendage from being suspended in the air.
[0094] Specifically, the coordinates of the pipe point where the three-dimensional model of the appendage is located can be obtained from the geometric information and field information. Therefore, when constructing the three-dimensional model of the urban underground pipe network, the three-dimensional model of the appendage is usually directly moved to the corresponding pipe point coordinates. However, due to the acquisition error of the two-dimensional data, the two-dimensional coordinates of multiple pipe point connection points connected to the pipe point may not be equal to the coordinates of the pipe point, resulting in the problem of the three-dimensional model of the appendage being suspended in the air;
[0095] Based on this, the embodiment of the present application determines whether the accessory three-dimensional model is in a suspended state by comparing the elevation field value of the pipe segment close to one end of the accessory three-dimensional model with the elevation field value of the accessory three-dimensional model. If so, a connecting pipe three-dimensional model is constructed between the accessory three-dimensional model and the pipe segment connection point to avoid the accessory three-dimensional model being suspended.
[0096] Based on the urban underground pipe network modeling method provided in the above embodiment, the embodiment of the present application also provides an urban underground pipe network modeling device, such as Figure 4 As shown, the device specifically includes:
[0097] The data analysis module 10 is used to analyze the shapfile file of the pipe network to obtain the geometric information and field information of the pipe network, and obtain the connection relationship between each pipe segment and pipe point based on the geometric information and field information;
[0098] The pipe segment three-dimensional model building module 20 is used to obtain the coordinates of the geometric center points of the cross sections at both ends of each pipe segment based on the radius, wall thickness and two-dimensional coordinates of the two ends of each pipe segment; obtain the normal vectors of the cross sections at both ends of each pipe segment based on the angle between each pipe segment and the pipe segments connected to it; obtain the three-dimensional model of each cross section of the pipe segment based on the normal vector, geometric center point coordinates and radius of each cross section of the pipe segment; obtain the three-dimensional model of each pipe segment based on the three-dimensional models of the cross sections at both ends of each pipe segment;
[0099] The sleeve three-dimensional model building module 30 is used to obtain the starting point coordinates, the middle point coordinates and the end point coordinates of the sleeve based on the two-dimensional coordinates of the multiple pipe segment connection points connected to the sleeve, so as to obtain the axis of the sleeve; calculate the vertex coordinates of the cross section where the m sampling points on the axis are located, obtain the three-dimensional model of the cross section where each sampling point is located, and obtain the three-dimensional model of the sleeve based on the three-dimensional model of the cross section where the m sampling points are located;
[0100] The tube well three-dimensional model building module 40 is used to build a tube well three-dimensional model based on the well chamber radius, well chamber wall thickness, two-dimensional coordinates of both ends of the well chamber, well neck radius, well neck wall thickness, two-dimensional coordinates of both ends of the well neck and a preset well cover thickness;
[0101] The urban underground pipe network 3D model acquisition module 50 is used to obtain the urban underground pipe network 3D model based on all pipe segment 3D models, all sleeve 3D models, all pipe well 3D models and all accessory 3D models in the pipe network.
[0102] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned urban underground pipe network modeling method are implemented.
[0103] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0104] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0107] Obviously, the above embodiments are merely examples for the purpose of clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A method for modeling an urban underground pipe network, characterized in that: include: Parse the shapfile file of the pipe network to obtain the geometric information and field information of the pipe network, and obtain the connection relationship between each pipe segment and pipe point based on the geometric information and the field information; Based on the radius, wall thickness and two-dimensional coordinates of each pipe segment, the coordinates of the geometric center points of the cross sections at both ends of each pipe segment are obtained; based on the angle between each pipe segment and the pipe segments connected to it, the normal vectors of the cross sections at both ends of each pipe segment are obtained; based on the normal vectors, geometric center point coordinates and radius of each cross section of the pipe segment, the three-dimensional model of each cross section of the pipe segment is obtained; based on the three-dimensional models of the cross sections at both ends of each pipe segment, the three-dimensional model of each pipe segment is obtained; Based on the two-dimensional coordinates of the connection points of multiple pipe sections connected to the sleeve, the starting point coordinates, the middle point coordinates and the end point coordinates of the sleeve are obtained, thereby obtaining the axis of the sleeve; calculating the vertex coordinates of the cross section where the m sampling points on the axis are located, obtaining the three-dimensional model of the cross section where each sampling point is located, and obtaining the three-dimensional model of the sleeve based on the three-dimensional model of the cross section where the m sampling points are located; A three-dimensional model of the pipe well is constructed based on the well chamber radius, well chamber wall thickness, two-dimensional coordinates of both ends of the well chamber, well neck radius, well neck wall thickness, two-dimensional coordinates of both ends of the well neck, and preset well cover thickness; Based on the 3D models of all pipe sections, all sleeves, all pipe wells and all accessories in the pipe network, a 3D model of the urban underground pipe network is obtained.
2. The urban underground pipe network modeling method according to claim 1, characterized in that: If the sleeve is a common sleeve, the coordinates of the middle point of the sleeve are obtained based on the two-dimensional coordinates of the connection points of the two pipe sections connected to the sleeve; The coordinates of the intermediate point are translated by a preset distance along the axis direction of the two pipe sections to obtain the coordinates of the starting point and the end point of the sleeve; The starting point coordinates, the middle point coordinates and the end point coordinates are connected to obtain the axis of the sleeve.
3. The urban underground pipe network modeling method according to claim 1, characterized in that: If the sleeve is a multi-pass sleeve, the coordinates of the middle point of the sleeve are obtained based on the two-dimensional coordinates of the connection points of the two pipe sections with the largest pipe diameters connected to the sleeve; The coordinates of the intermediate point are translated by a preset distance along the axis direction of the two pipe sections with the largest pipe diameters to obtain the coordinates of the starting point and the end point of the sleeve; The starting point coordinates, the middle point coordinates and the end point coordinates are connected to obtain the axis of the sleeve.
4. The urban underground pipe network modeling method according to claim 1, characterized in that: The calculation formula for the vertex coordinates on the cross section where the sampling point is located is: Among them, p i represents the vertex coordinates of the i-th sampling point on the axis on the cross section, p i-1 Indicates the vertex coordinates of the i-1th sampling point on the axis on the cross section, M is a preset parameter, Represents the normal vector of the cross section where the i-th sampling point on the axis is located, p c Indicates the coordinates of the middle point of the sleeve, p c-1 Indicates the starting point coordinates of the sleeve.
5. The urban underground pipe network modeling method according to claim 1, characterized in that: Based on the well chamber radius, well chamber wall thickness, two-dimensional coordinates of both ends of the well chamber, well neck radius, well neck wall thickness, two-dimensional coordinates of both ends of the well neck and preset well cover thickness, the three-dimensional model of the pipe well is constructed, including: Based on the radius and wall thickness of the well chamber and the two-dimensional coordinates of the two ends of the well chamber, the coordinates of the geometric center points of the cross sections at the two ends of the well chamber are obtained; Based on the radius of the well chamber and the coordinates of the geometric center points of the cross sections at both ends, a three-dimensional model of the cross sections at both ends of the well chamber is obtained; based on the three-dimensional model of the cross sections at both ends of the well chamber, a three-dimensional model of the well chamber is obtained; Based on the radius and wall thickness of the well neck and the two-dimensional coordinates of the two ends of the well neck, the coordinates of the geometric center points of the cross sections at the two ends of the well neck are obtained; Based on the radius of the well neck and the coordinates of the geometric center points of the cross sections at both ends, a three-dimensional model of the cross sections at both ends of the well neck is obtained; based on the three-dimensional model of the cross sections at both ends of the well neck, a three-dimensional model of the well neck is obtained; Based on the radius and preset thickness of the well neck, a three-dimensional model of a manhole cover having the same shape and matching size as the well neck is generated; The side surface of the well chamber three-dimensional model, the side surface of the well neck three-dimensional model and the top surface of the well cover three-dimensional model are texture mapped, and the pipe well three-dimensional model is obtained based on the mapped well chamber three-dimensional model, well neck three-dimensional model and well cover three-dimensional model.
6. The urban underground pipe network modeling method according to claim 5, characterized in that: If the pipe well is a rainwater grate or an electric power well, then the two cross-sectional geometric center points farthest from the pipe well among all pipe sections connected to the pipe well are obtained; The rotation angle of the three-dimensional model of the pipe well is calculated based on the two cross-sectional geometric center points, and the three-dimensional model of the pipe well is rotated around the z-axis based on the rotation angle of the three-dimensional model of the pipe well.
7. The urban underground pipe network modeling method according to claim 6, characterized in that: The calculation formula of the rotation angle of the tube well three-dimensional model is: Among them, θ represents the rotation angle of the three-dimensional model of the tube well, represents the vector formed by the two cross-section geometric center points p1 and p2 that are farthest from the tube well, Representation vector The model, represents the positive x-axis of the coordinate system, and T represents transpose.
8. The urban underground pipe network modeling method according to claim 1, characterized in that: Also includes: Determine whether the elevation field values of the plurality of pipe segments connected to the appendage three-dimensional model and one end of the appendage three-dimensional model are the same as the elevation field value of the appendage three-dimensional model; If the elevation field values of the plurality of pipe segments connected to the appendage 3D model close to one end of the appendage 3D model are different from the elevation field value of the appendage 3D model, it is determined that the appendage 3D model is suspended; The geometric center point at the bottom of the three-dimensional model of the appendage and a plurality of pipe segment connection points are used as endpoints to generate a three-dimensional model of the connecting pipe, thereby preventing the three-dimensional model of the appendage from being suspended in the air.
9. A modeling device for an urban underground pipe network, characterized in that: include: A data parsing module is used to parse the shapfile file of the pipe network to obtain the geometric information and field information of the pipe network, and obtain the connection relationship between each pipe segment and pipe point based on the geometric information and the field information; The three-dimensional model building module of the pipe segment is used to obtain the coordinates of the geometric center points of the cross sections at both ends of each pipe segment based on the radius, wall thickness and two-dimensional coordinates of the two ends of each pipe segment; obtain the normal vectors of the cross sections at both ends of each pipe segment based on the angle between each pipe segment and the pipe segments connected to it; obtain the three-dimensional model of each cross section of the pipe segment based on the normal vector, geometric center point coordinates and radius of each cross section of the pipe segment; obtain the three-dimensional model of each pipe segment based on the three-dimensional models of the cross sections at both ends of each pipe segment; A sleeve three-dimensional model building module is used to obtain the starting point coordinates, the middle point coordinates and the end point coordinates of the sleeve based on the two-dimensional coordinates of the connection points of multiple pipe sections connected to the sleeve, so as to obtain the axis of the sleeve; calculate the vertex coordinates of the cross section where the m sampling points on the axis are located, obtain the three-dimensional model of the cross section where each sampling point is located, and obtain the three-dimensional model of the sleeve based on the three-dimensional model of the cross section where the m sampling points are located; A tube well three-dimensional model building module is used to build a tube well three-dimensional model based on the well chamber radius, well chamber wall thickness, two-dimensional coordinates of both ends of the well chamber, well neck radius, well neck wall thickness, two-dimensional coordinates of both ends of the well neck, and preset well cover thickness; The urban underground pipe network 3D model acquisition module is used to obtain the urban underground pipe network 3D model based on the 3D models of all pipe sections, all sleeves, all pipe wells and all accessories in the pipe network.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the urban underground pipe network modeling method described in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Underground pipe network three-dimensional modeling visualization method and system
CN119091063A
