Keywords

1 Introduction

The arrival of the “big data era” will transform the construction of urban geographic information system (GIS) from a digital city to a more advanced smart city [1], and the construction of village GIS is also imperative. In the context of the information age, the construction of smart cities is in full swing. Relying on emerging technologies such as big data, cloud computing, artificial intelligence and three-dimensional visualization in smart cities [2], a digital village 3D GIS is constructed to improve the efficiency of village digital construction.

Governments have provided valuable experience for the construction of digital village areas by formulating relevant policies and regulations to continuously promote the innovation of agricultural village development model. In foreign countries, since the 1950s, the United States has started to implement the construction project of agricultural village information. With the help of the perfect infrastructure project of agricultural village information network, the agricultural information service system has been constructed, which promotes the process of village digitization in the United States [3]. The European Union actively promotes the project of “Building a Smart Village in the 21st Century”, which greatly promotes the digitization, networking and intelligent development of the village [4]. Canada pays attention to the integration and sharing of information resources in the construction of digital village and accelerates the construction of village information technology with the help of the Internet and digital media [5]. India’s software industry promotes the development of agricultural information services and provides decision support for urban, village and agricultural development [6]. In china, digital village construction has achieved remarkable results. Domestic scholars have made in-depth research on village digitization and 3D visualization methods. Liu (2008) [7] uses Skyline as the secondary development platform, constructs a 3D visualization system of digital village, and achieves the basic 3D map operation function. Li (2010) [8] uses Skyline series software to build a 3D digital village system in Yunkangcun, which implements spatial analysis and other functions. Fu (2017) [9] built a beautiful village geographic information service system based on the WeChat public platform, which solved the inconvenience of village GIS in mobile devices and other issues. Tan (2018) [10] uses 3ds MAX software and ArcGIS software to realize 3D visualization of village landscape. Du (2021) [11] based on MVC system architecture and SuperMap platform, has designed and implemented a B/S mode digital Lianzhang 3D virtual GIS. The existing village digitization and 3D visualization methods provide a powerful reference for the construction of digital and even smart village. However, most of them are redeveloped based on Skyline, ArcGIS and other software. The client (C/S) mode or the mode of installing plug-ins on the browser for browsing are mainly used, which can not meet the current requirements of village GIS construction. At the same time, 3D village visualization based on open source GIS platform needs further study.

Compared with commercial GIS software, open source GIS software has the characteristics of flexibility and economy, and plays an important role in the field of GIS [12]. As a popular open source 3D map engine, Cesium can integrate multi-source and heterogeneous spatial data on the digital earth and has the ability to interact with the server asynchronously [13]. Based on the Cesium open source 3D map engine, take Kangle Village, Changle Town, Shapotou District, Zhongwei City, Ningxia as an example to construct a digital village 3D GIS and express the comprehensive multi-source geographic information of Kangle village.

2 System Architecture

The digital village 3D GIS adopts B/S architecture, which is divided into three layers: data layer, service layer and presentation layer. The data layer includes basic geographic data, real-time/local video files, 3D tiles model resources, etc. It is mainly responsible for maintaining spatial data and attribute data to provide data support for the system. The core of the system is the service layer composed of Web server, GIS server and streaming media server. The Web server is responsible for the deployment of Web applications, the GIS server is in charge of the release of geographic data services, and the streaming media server is applied for the storage, coding and transmission of video streaming data. As the liaison layer between presentation layer and data layer, service layer is mainly responsible for the data interaction between front and back end. The presentation layer is the part of users’ intuitive perception, which mainly realizes the coordination operation between users and the system. The overall structure is shown in Fig. 1.

Fig. 1.
figure 1

System architecture

3 The System Design

3.1 Data Organization and Loading Scheduling of 3D Model

In order to present the structure and texture features of massive 3D models to the maximum extent and restore the details of buildings, 3D tiles are used for the organization of village 3D real scene data by analyzing the data format of Cesium 3D real scene model. 3D tiles are based on GL transmission format and combined with LOD technology to improve the rendering efficiency of 3D geographic information data in the 3D Web-GIS framework [14]. The tile set data is stored by a file in tileset.json format, and the tile data is responsible for storing geometric and attribute data. The loading efficiency of 3D tiles depends on the spatial index structure of tiles, which typically includes quadtree, octree, k-d tree, grid structure, etc. [15]. The browser side has certain limitations in rendering massive 3D real data. When users browse massive village 3D real data, the objects observed are only part of them. By eliminating the view field, the amount of data for rendering massive 3D model by the browser is reduced, so as to improve the efficiency of data scheduling. The rendering accuracy of the 3D model is determined by the screen space error (SSE), and the current SSE ρ is calculated by formula (1) [16, 17]. Compared with the given threshold ε, if ρ > ε, the node of the next level is continued to be loaded, and if ρ < ε, the tiles of the current level are used for scene visualization.

$$\rho =\frac{H}{2tan(\alpha /2)}\times \frac{\delta }{D}$$
(1)

where, ρ is the SSE; δ is the static error of the node; α is the field of view angle; H is the screen height; D is the distance from the viewpoint to the node.

The study area is located in a village area, and the density of buildings is inconsistent and uneven. According to the characteristics of spatial data, a continuous Hierarchical Level of Detail (HLOD) model is generated by the corresponding spatial partition method. The leapfrog transmission strategy [18] is adopted to schedule the scene HLOD. When the viewpoint parameters change, if the SSE of the tile is greater than the threshold, it is necessary to recursively traverse the sub tiles of the current tile until a tile with a resolution meeting the refinement conditions is found for rendering. This scheduling strategy will cause problems such as unreasonable tile detail level filtering, and the scene loading is not smooth. Although the progressive transmission strategy can ensure the smoothness and continuity of tile loading, the amount of tile data of tilting model is large. If loading start from low resolution tiles to high resolution tiles that meet the refining requirements, it will lead to excessive memory consumption, browser stuttering and other problems [19]. In the practical application of the project, the progressive transmission strategy and the leapfrog transmission strategy are combined to set a reasonable SSE threshold, which can not only ensure the smoothness and continuity of tile loading, but also reduce the amount of data to a certain extent.

3.2 Monomer of Oblique Photography 3D Model

The 3D model produced by the oblique photography technology is a continuous triangulated irregular network (TIN), which cannot realize the functions of independent selection, query and attribute assignment of the target object. On the basis of not destroying the continuity of the physical layer of the 3D model, dynamic rendering is used to realize the monomer of the 3D model [20]. The implementation principle is to superimpose the vector base map on the object that needs to be monomer, and dynamically render the monomer effect of the ground object. Cesium’s process of realizing 3D model monomer is essentially a process of dynamic rendering monomer. The key is the generation of bounding box, through the terrain contour vector data, and the bounding box is superimposed with the tilt photography model to achieve model segmentation visually. Since the physical structure of the 3D model is not damaged, the rendering efficiency of the 3D model will not be affected.

The monomer of 3D model is an urgent problem to be solved when the 3D model of oblique photography is applied to GIS. The monomer of model is the prerequisite for the realization of spatial analysis and attribute query. The non-offset image map was obtained according to the spatial position of the 3D model of oblique photography, which was imported into ArcGIS software to vectorize objects to be monomer and add attribute information such as name, address and height. The vector plane was imported into CesiumLab data processing system. The shape file is converted into bounding box 3D tiles by the vector block slicing tool, which is superposition with the tilted 3D model to achieve monomer.

3.3 Video Streaming and 3D Scene Fusion

Video stream and 3D scene fusion technology can generate dynamic virtual scenes on static 3D models, and integrate the monitoring video with the corresponding 3D scene to achieve the effect of virtual reality fusion [21]. In this paper, the projection texture mapping [22] method is used to render the monitoring picture as a dynamic texture in real time, realizing the close integration of monitoring video and 3D scene. The key to achieve the video fusion effect is video projection. The model view matrix Mmv and projection matrix Mp are calculated by camera position and orientation information, and the pixel texture coordinates s corresponding to the vertex coordinates p of the model surface are calculated by formula (2), then the occluded part of the model is clipped to improve the fusion efficiency. After the pixel texture grating, the video fusion effect is finally achieved. The texture of the video model is obtained from the streaming media server by the <video> tag on the browser side.

$$S = {M}_{p} \cdot {M}_{mv} \cdot P$$
(2)

The texture of the video model is provided by the streaming media server, which obtains real-time video data from the webcam through the Real Time Messaging Protocol (RTMP) and sends it to the user’s browser after encoding. The transmission of video stream to the browser is realized through HTTP Live Streaming (HLS) protocol. The Streaming media server fragments the surveillance video according to HLS protocol and sends it to the browser through HTTP. The <video> tag on the browser side can obtain real-time video streams by requesting configuration files and video shards of real-time streams. If the browser requests a locally cached video, the streaming media server directly finds the corresponding cache file and sends it to the requesting browser.

4 Experiment

In order to verify the practicability and feasibility of the design scheme and implementation technology, a digital village 3D GIS was built in Kangle Village, Changle Town, Shapotou District, Zhongwei City, Ningxia, for experimental verification and analysis.

4.1 Experimental Environment and Data

The experimental hardware environment is as follows: Intel(R) Xeon(R) CPU E3-1225 V5@3.30 ghz, 16 GB memory, NVIDIA GeForce GTX 1060 6 GB graphics card. The software environment is Windows7 64-bit operating system and Google Chrome browser.

The data used are the oblique photography data of the experimental area which is about 1.1 km2. The source data format of the oblique photography model is OSGB, and the data volume is 4.45 GB, and the data volume after format conversion is 1.73 GB. Experiment 1 explores the changes of visualization efficiency under different view heights, only change the view heights, intercept the 3D visualization scene of Kangle Village under different view heights, and record the changes of visual frame rate during the change of view heights in real time. The experiment is tested in LAN environment. Experiment 2 explores the differences in visualization efficiency during scene interaction under different network environments, and records the changes of visual frame rate under wireless network and broadband network in real time. The experiment is tested under wireless network and broadband network respectively.

4.2 Results

In Experiment 1, the 3D visualization scene of Kangle Village is shown in Fig. 2, and the effect of view height on frame rate is shown in scene d. The initial loading adopts a large-scale macro perspective, with a height of 1051.67 m (scene a). In the process of 3D scene visualization rendering, tiles of different fineness are dynamically loaded with the change of the perspective. When the viewpoint height is high, low resolution tiles are loaded. At this time, the bounding box of tiles is large. As can be seen from the real-time frame rate graph (real-time frame rate d), there are many tiles at the beginning of scene loading, and the frame rate is low. When the height drops to 234.20 m (scene b), the visual range of the scene decreases, the number of tiles loaded decreases, and the frame rate will gradually increase and remain stable. When the height is reduced to 57.72 m (scene c), tiles with different resolution levels of detail are dynamically loaded. At this time, the tile bounding box is small, and the frame rate is further increased and remains stable. During the whole scene loading process, the number of tiles loaded is reduced while satisfying the visual effect.

In Experiment 2, the visual real-time rendering frame rate under broadband network and wireless network environment is shown in Fig. 3. The visualization frame rate is stable at about 35 FPS in both broadband network and wireless network environments, which proves that the proposed method can meet the requirements of 3D visualization of Kangle village under different network environments.

Fig. 2.
figure 2

3D visualization of Kangle Village

Fig. 3.
figure 3

Visualized frame rates under different network environments

4.3 System

This paper mainly realize the functions of monomer, plotting measurement, the viewshed analysis, particle system, real-time dynamic information release and so on.

Monomer of Oblique Photography 3D Model.

The key to realize the monomer function of dynamic rendering of tilting photography 3D model lies in the conversion of data format and the acquisition of bounding box 3D tiles. In this paper, CesiumLab Data processing system was used for Data format conversion. Metadata.xml file and Data file were input and parameters were set according to the conversion requirements to realize the conversion between OSGB and 3D tiles. Shape file was converted into bounding box 3D tiles by vector block slicing tool. The 3D tiles of the bounding box are superimposed with the tilted photographic model to realize dynamic monomer. Finally, the mouse click event is set to query the location and ownership of the house and highlight the monomer object when the monomer model is clicked. The effect is shown in Fig. 4, which can query the location of the house and other information in real time and highlight the monomeric object.

Fig. 4.
figure 4

Monomer of the 3D model

Measuring and Plotting.

The system plotting measurement includes three sub-functions: distance measurement, area measurement and filling and excavation calculation. The distance measurement function can not only measure the spatial distance between two points and multiple points (e.g. continuous measurement), but also obtain the height difference between two points in space. The area measurement function refers to the area measurement of space. The filling and excavation calculation is to divide the selected area into countless triangles, calculate the volume of each triangle and judge whether to excavate or fill. As shown in Fig. 5, the system measures the space distance and area of the house in a digital way, as well as analyzes the filling and excavation based on a datum plane, which can effectively reduce the labor and material input and improve the measurement efficiency.

Fig. 5.
figure 5

Plotting measurement

The Viewshed Analysis.

The viewshed analysis is widely used in village planning, sunshine analysis, shading of road features (traffic signs, signal lights, etc.), location selection of surveillance cameras, etc. [23]. In this paper, the viewshed analysis is applied to the location selection of surveillance cameras in village areas. After the observation points and viewing angles are determined, the viewshed analysis is carried out on the village 3D scenes. The viewshed analysis results are shown in Fig. 6, in which green represents the visible area and red represents the invisible area. The system can simulate the visual monitoring effect of different observation points and viewing angles in real time to determine the best deployment mode of the camera.

Fig. 6.
figure 6

Viewable analysis

Particle System.

Particle system is a graphics technology used to simulate complex physical effects [24]. It describes the changes of irregular objects by setting the position, shape, moving speed, moving direction, life cycle and other attributes of particles. The particle system can simulate irregular objects such as rain, snow and flame in real time, and effectively enhance the realism of 3D scenes. As shown in Fig. 7, the rainfall scenario of Kangle Village is simulated.

Fig. 7.
figure 7

Particle system

Real-time Dynamic Information Release.

Real-time dynamic information in the village, such as electronic announcement service and real-time monitoring video, are indispensable information sources to reflect the village dynamics. In this paper, the projection texture mapping method is used to integrate the dynamic information and monitoring video of village revitalization with 3D scenes, so as to realize the real-time dynamic information release and online viewing of surveillance video. As shown in Fig. 8, the dynamic information of village revitalization is integrated with the 3D scene.

Fig. 8.
figure 8

Video fusion

5 Conclusions

This paper adopts B/S architecture, based on Cesium open source 3D map engine, relying on big data, virtual reality, 3D visualization and other emerging technologies owned by smart cities, and takes Kangle Village, Changle Town, Shapotou District, Zhongwei City, Ningxia as an example to build a digital village 3D GIS. The research results are as follows:

  1. 1.

    The construction and efficient visualization of village 3D scenes are realized with oblique photography data as the basic support, combined with 3D model data organization and loading scheduling technology.

  2. 2.

    The dynamic monomer of village landscape is realized by using the monomer technology of the 3D model of oblique photography, so that the 3D model of oblique photography has the characteristics of vector data. On this basis, the attribute information query of geographical elements of Kangle Village in Changle Town is realized.

  3. 3.

    The system realizes the spatial analysis of the 3D scene of Kangle Village, and carries out plotting measurement and visibility analysis of the geographical elements of Kangle Village in a digital way. The rainfall scene of Kangle Village is simulated by particle system to improve the interactivity of scene simulation and enhance the reality of 3D scene.

  4. 4.

    The system integrates real-time dynamic information, terrain data, video data, panorama data and other multi-source information. On the basis of solving the key technologies such as the organization and transmission of multivariate data, it realizes the visualization of village 3D scene, and carries out all-round multi-source geographic information expression for the village, making the static village data “fresh” and “rich”.

Digital village 3D GIS is developed based on open source platform, which has certain requirements for spatial data format. Different types of spatial data need format conversion, so it is necessary to conduct in-depth research on data sources and data interfaces, reduce the dependence of the platform on the data format, and improve the development efficiency of the system. The digital village 3D GIS can be used as the basic information platform of Kangle Village to further integrate village announcement, asset management, construction planning and other businesses and functions into it, providing a technical basis for the construction of smart villages.