With the continuous development and advancement of geographic information systems (GIS), it has become challenging for traditional two-dimensional GIS to meet the needs of geospatial visualizations and analysis [1
]. With the widespread application of GIS in society, the application of three-dimensional (3D) scenes in smart cities is becoming deeper and wider [3
]. The traditional two-dimensional management model has been unable to meet the actual needs of the pipe network and pipe big data information analysis, expression, and application. The three-dimensional pipe network occupies a large part of the application scenarios. The performance-based city planning includes data management, data modeling, data analysis and data visualization. Due to the large-scale data size, wide range and various pipeline networks and pipelines, both on the ground and underground, and the spatial distribution is complex and varied, high-performance modeling of 3D pipe networks remains challenging. It is therefore essential to study the 3D pipe network construction and high-performance rendering.
Geodesign is proposed in order to visualize models for city planning [6
]. With the development of Building Information Modeling (BIM), a three-dimensional model of construction project or facility’s physical and functional characteristics, and a shared knowledge has gradually become a common data expression in the field of architecture. Resources provide a decision-making basis for the management of the life cycle of a project or a facility. At different stages of the life cycle, various stakeholders modify information through BIM to coordinate operations. BIM data is an important data source for 3D GIS [8
]; it enables 3D GIS to move from macro to micro, and at the same time to achieve refined management—especially for pipe networks.
Utility networks are modeled using graph-theory abstractions [10
], because the structure properties of graph provide network nodes and links. Most utility networks are based on two dimensional modeling design [12
], but in some cases, applications such utility networks operate in 3D [13
]. Pipe network is one type of utility network, the construction of a 3D pipe network is based on network science and GIS. As the BIM-oriented network model can be used in indoor network applications [16
], a 3D pipe network should be used in both outdoor and indoor GIS. It is challenging to design 3D pipe networks by considering visualization, checking topology, data management, and 3D network analysis.
The 3D pipe network includes the pipe point portion and the pipeline portion. In the existing three-dimensional systems, the pipeline portion is normally constructed by vector line lofting, and the pipe point is generally built by manual modeling and then imported into the scene. The workflow of these pipe point models requires a lot of manpower and material resources. At the same time, for 3D pipe network data, the user’s data source is often vector point and line data. If the model’s display mode is adopted, data redundancy and extra workload are unfortunately inevitable. The maintenance of vector seed of point, line data and pipe point models is required as well. In addition, in some enterprise-level scenarios, pipe network data in 3D city models is extremely dense, and thus rendering these dense pipe networks requires a lot of hardware resources. Therefore, improving the carrying capacity and rendering performance of massive pipe network data can be the answer to current capacity and rendering performance limits.
GIS-based methods and modeling are widely used in urban planning [17
]. GIS and BIM are located in two different sectors for building a smart city. BIM provides the data foundation, and GIS provides a spatial reference, spatial analysis and decision making [22
]. The combination of BIM and GIS contributes to urban planning, water conservancy projects, railway information modeling, underground pipe network information modeling, ancient building modeling and other fields [25
]. The integration of GIS and Computer-aided design (CAD) supplies new data sources for building a smart city [27
]. A hybrid system for expanding 2D GIS into the 3D scene is an effective way to consider the integration of 2D GIS and 3D GIS [29
]. There are fewer studies that focus on the integration of spatial data modeling for GIS, BIM, CAD, and oblique photography. It is critical to study the integration model for spatial 3D data.
The computing-intensive framework plays an essential part in high-performance based smart city applications [30
]. Parallel computing is an effective way to visualize 3D city models [31
]. 3D city modeling requires effective algorithms [33
]. NVIDIA, inventor of the graphics processing unit (GPU), proposes a parallel computing framework based on computing unified device architecture (CUDA), which can be used to speed up the processing efficiency of geospatial applications [35
]. The multi-threaded parallel processing based on multi-core central processing unit(CPU)s provides extensive computational capabilities [38
]. The scientific computing for building city modeling is shifting from a CPU-centric central processing model to a collaborative processing model in which CPUs and GPUs work together [40
In this paper, we propose a hybrid framework for high-performance modeling of 3D pipe networks. This paper is organized as follows: Section 2
introduces a pipe network data model, Section 3
shows hybrid high-performance modeling of 3D pipe networks, Section 4
describes the experiments and the results, and the last section is the conclusion and further work.
3. High-Performance Modeling for 3D Pipe Networks
The framework for high-performance modeling of 3D pipe network contains a spatial 3D model, instantiation, adaptive rendering, and combinational parallel computing.
3.1. Spatial 3D Model (S3M)
Spatial 3D model (S3M) is proposed for spatial data transmission, exchange and high-performance visualization of massive and multi-source 3D spatial data [42
]. It meets the requirements of users in three-dimensional data transmission and analysis between different terminals (mobiles, browsers, and desktops) through an efficient and scalable data specification. S3M supports multi-source data, including pipelines, BIM, laser point clouds, vector, terrain, dynamic water surfaces, and 3D grids. S3M provides the ability to efficiently visualize a large amount of data using the level of details (LOD), batch rendering, and instantiation to improve the rendering performance.
The S3M includes description files, index tree files, data files, and attribute files. The file organization of each object storage is shown in Table 3
. S3M TileTreeSet object is the basic element in S3M. TileTreeSetInfo is its description information, which is an overall description of the data. If the TileTreeSet is constructed based on the point, line, polygon or model dataset, there may be an AttributeInfos that represents attribute description information for each data set. Space division of three-dimensional data are in a specified spatial range, each spatial division corresponding to a tree structure organization tile collection is represented by a TileTree object. IndexTree is index information of its tree structure. AttributeData representing attribute data are recorded in TileTree attribute data for each object. Each TileTree is subdivided step by step from top to bottom, and each space partition corresponds to one tile, represented by a Tile object.
The description file (.scp) and data folder are the basic components. The description file contains the path filename (.json) for each TileTree. The index file is a description of the tree structure of the tile data and can obtain the bounding box of the tile file of each layer, the switching information of the LOD and the attached child node file without loading the actual data. The main role is to accelerate the efficiency of tile file retrieval; the attribute data includes one attribute description file (attribute.xml) and a .xml file storing each tile attribute data in each TileTree. All tiles in TileTree form a tree-like logical structure.
To facilitate sharing of multi-source heterogeneous geospatial data, the open geospatial database connectivity (OGDC) was proposed to connect different types of geospatial data (Figure 7
). OGDC provides a unified entry to geospatial data [43
]. The unified data specifications, such as I3S [18
] and S3M, can be used for high-performance, consistent access to data in the system, such as various GIS terminal applications, and user APPs.
3.2. Instantiation Rendering of Pipe Networks
Instantiated rendering refers to multiple renderings of a grid using different parameters at different locations. Instantiation is often applied to the rendering of static mesh objects such as leaves, grass, etc. in a large number of scenes. All instances share a vertex buffer, which is used to store a single grid of data that will be instantiated multiple times. The instance buffer is used to store instance data for each object, including the information such as transformation matrices, color data, and lighting data. The rendering process is combined with a vertex buffer and an instance buffer for rendering.
The pipeline is in fact composed of pipe sections that are substantially similar and have slightly different positions and directions. In order to render these slightly different pipe segments, the traditional method is to store each pipe segment separately, which consumes a lot of memory resources; or it needs to switch frequently between rendering states, such as rotating and panning each pipe segment, which significantly affects rendering performance. By instantiating the grid of reused pipe segments, reducing the number of calls and memory requirements, and giving most of the rendering work to the GPU, reducing the CPU load is a good way to improve rendering performance.
For the instantiation of the pipe point pipeline, only two sets of grids need to be established. One set is a complete section pipe section for rendering the elbows in the pipeline and the pipe points, and the other set is a half-section pipe section for rendering the multi-pass pipe points. As shown in Figure 8
, the different tube segment examples differ in the position of the cross-section at both ends, in the size of the zoom, and in the direction. These can be represented by two transformation matrices MBottom
. The matrix stores 18 floating point numbers representing the three rows and three columns of the two matrices into the instance buffer, and the grid data of the pipe segment is stored in the vertex buffer. In addition, the vertex needs to be stored in the vertex attribute of the vertex buffer, to which the matrix belongs before and after. Finally, the vertex position of the pipeline can be calculated by multiplying the vertices of the static mesh with the matrix in the vertex shader.
3.3. Adaptive Rendering for Pipe Network Data
The BIM data structure includes a spatial data model and attributes data. The spatial data model includes spatial information and appearance shape. The attribute data includes design parameters, construction parameters and operation, and maintenance parameters. The 3D GIS covers the data structure of BIM (spatial data and attribute data), covering the data representation of BIM (3D model), covering BIM data objects (BIM for architectural objects, and GIS covers a wide range, including architectural objects), and it overlaps with the BIM function (information management and spatial analysis). The 3D underground pipeline scene based on BIM-GIS consists of three-dimensional pipe points and three-dimensional pipelines. The three-dimensional pipeline includes round pipes, square grooves, pipe blocks, and vertical pipes. Three-dimensional pipe points include three types of feature points, wells and ancillary facilities: feature points such as elbows, straight throughs, three-way, cover plugs, and pipe caps. Wells include square wells, round wells, and rain rafts. Ancillary facilities include valves and water meters. Based on the BIM technology, this study uses linear symbols to construct three-dimensional pipelines and adaptive pipe point symbols to construct three-dimensional pipe points. Some special feature points, wells, and ancillary facilities are displayed by model symbols.
BIM model symbols can be used to visualize the pipe points with complex shapes, such as valves. However, in the three-dimensional scene, the model symbols cannot adaptively adjust the angle according to the direction of the pipeline in the X
, and Z
directions. Due to the influence of the model angle, the pipe point deviates from the scene, for example, the pipe at the bottom of the valve cannot be connected with the pipeline and the valve switch is covered by a pipe. We can convert the BIM model to 3D pipe network using S3M (Figure 9
An adaptive rendering model is proposed with the combinations of the data structure of the BIM model and the spatial structure characteristics of 3D GIS. The adaptive rendering model contains a pipe layer setting method and a symbol matching method. The pipe point layer was shown in a custom thematic map, specifying a property field as the symbol style of the thematic map. After setting the parameters of the symbol model, the symbol matching method adjusts the angle according to the pipeline orientation, including the pipe at the bottom of the valve in the pipeline direction, and the valve switch perpendicular to the pipeline direction (Figure 10
3.4. Combination Computing Framework with GPU and OpenMP
Rendering large-scale 3D pipe networks requires intensive computational time. The combinational parallel computing framework with GPU and OpenMP can greatly improve computing intensive pipe network-based applications. Considering that the spatial data exchange between the memory and the memory is time-consuming, and the large pipe network data cannot be copied to video memory at one time. We used the method of reading the pipe network data into the video memory. At the same time, we introduce the multi-thread processing strategy based on OpenMP to minimize the time occupation of GPU computing and data exchange to achieve the purpose of hiding data exchange time as much as possible.
Each CUDA core is only responsible for calculating the pixel result value of one specific location at the same time, and the kernel function specifies the specific calculation method. The specific workflow of a kernel function is to obtain the location of the pixel according to the built-in thread ID, and obtain the neighboring pixel at the location of the pixel (Figure 11
). Then, the cell value is calculated based on the specific operator. Among them, the temporary variable corresponding to the neighboring pixel value is stored by using the shared memory inside the CUDA thread block, which can effectively improve the analysis performance. The computational resources were recycled when the combinational parallel computing framework was finished.
The 3D pipe network model was implemented and the performance of the visualization is verified. The open source GIS projects are developed to verify the efficiency for the hybrid method of modeling the 3D pipe network. 3D pipe network model can be shown in desktop GIS, mobile GIS, and web GIS. The iDesktop-cross [44
] is an open source desktop GIS project [45
]) is a visual analytics framework for WebGIS based application [7
]. The pipe network data is shown in the outdoor GIS (Figure 12
a) and the indoor GIS (Figure 12
Based on the API provided by iClient3D for WebGL [47
], the pipe network visualization is shown in Figure 13
and is developed by SuperMap iEarth for WebGL [48
To test the performance using the methods above, we use the instantiation and non-instantiation techniques to test the performance of the applications of 3D pipeline networks. The experimental environment is in the 64-bit Windows 7 operating system with 4 GB memory, the graphics card uses GTX650 with 2 G memory, and the CPU is an Intel i5-3340 with 3.1 GHz quad-core processor. The test scenario is pipeline data of a certain plant area, the area is about 5 km2
, and the pipeline is densely distributed, as shown in Figure 14
. We specify the flight route in the scene, then let the camera automatically move along the flight path, recording the frame rate, CPU usage, and memory usage at each moment along the way.
The experimental results are shown in Table 4
. By using the instantiation method, the frame rate is increased by about 100%, the CPU usage is reduced to 33%, the memory usage is reduced to 25%, and the memory usage is slightly reduced. Proving that instantiation technology improves pipeline rendering performance is significant.
5. Conclusions and Discussion
In summary, we propose a hybrid framework for high-performance modeling of 3D pipe network, including pipe network data model and high-performance modeling. The pipe network is decomposed into two sections described in Section 2
, and the multi-pass pipe point is decomposed into a set of pipe segments described by two half sections, through the topological relationship between the pipe point and the pipeline. Through this decomposition, complex pipe points can be split into simple units. In this way, a well-matched pipe point pipeline model can be quickly constructed, saving a lot of manual operations and improving the efficiency of building pipeline scenarios. In addition, the split pipe segment unit can be easily combined with the instantiation technique for rendering.
The results of the experiments have shown that the use of instantiation technology significantly improves the rendering performance of the 3D pipe networks. 3D pipe network design needs more time. The hybrid method reduces the cost for constructing 3D pipe network scene and improves the rendering performance of 3D pipelines and 3D pipe points. The geospatial application of 3D pipe network is complex. Spatial 3D model (S3M) is proposed for spatial data transmission, exchange, and visualization of massive and multi-source 3D spatial data. Rendering large-scale 3D pipe networks requires intensive computational resources. The combination parallel computing framework with GPU and OpenMP significantly reduces the processing time for large-scale 3D pipe networks. The results of the experiments showed that the hybrid framework achieves a high efficiency and the hardware resource occupation is reduced.
The hybrid framework for high-performance modeling of 3D pipe network that integrates geospatial applications makes GIS integrate into the high-performance based smart city with unprecedented opportunities. There are however some limitations to this study. (1) This study did not consider spatial cloud computing and edge computing, which is more powerful than hybrid parallel computing. Spatial cloud computing can address the high-performance based challenges for large-scale geospatial applications because spatial cloud computing has the ability to process large-scale 3D GIS models with high performance. Edge computing enables spatial analytics and geospatial data gathering to process near the source of the spatial data. Edge computing has the opportunity to perform real-time 3D pipe network modeling. (2) Our models did not consider artificial intelligence (AI) properties. 3D pipe network data production takes a long time with manual work. It is essential to extract the pipe network data from LiDAR data and remote sensing images using AI-based methods. In future work, we will focus on the integration of spatial cloud computing, edge computing, and machine learning to high-performance based smart city applications.