# An IoT-Based Intelligent Geological Disaster Application Using Open-Source Software Framework

Authors: Yang Liu; Jin Zhang
Journal: Scientific Programming
 (2022)

---

## Abstract

With the development of Internet of Things (IoT) and machine learning technologies, mobile geographic information systems (GISs) have developed rapidly. Moreover, mobile GIS applications serve all walks of life including remote sensing, geological disaster management, and decision support systems. This article discusses the main development methods of the Android system for mobile GIS, analyzes the characteristics of different development methods, and mainly introduces the technology of developing mobile GIS based on free and open-source software (FOSS) framework. Finally, we present a data collection framework for an Android application development, based on QGIS, QFiled, GeoServer, PostgreSQL, and GeoPackage. The mobile GIS can collect important data. Furthermore, the data collection framework uses a data aggregation technique to filter and remove redundant data. Machine learning approaches are integrated in the GIS to make it intelligent. The application, in the Xishan mining area of Taiyuan, proves that the proposed framework can complete the collection and storage of geological disaster data, which has certain practical significance. Our experimental results show that the data aggregation method is approximately 42.3–44.09 percent (training times) more efficient than the no aggregation approach. Moreover, the attention network may produce an additional overhead in the prediction process, depending on the model. This overhead is observed between 0.58% and 2.83% for the LSTM model.


---

## Body

## 1. Introduction

The evaluation of geological disasters is the basis for prevention and control of geological disasters. Traditional field surveys of geological disasters are based on paper maps and image data, using GPS, cameras, and other equipment to collect data and then organize and manage the data indoors. The workload of this process is large, and the interaction of each link is poor. Moreover, it is easy to make mistakes, which may lead to low work efficiency. Now, the digital survey of geological disasters has become the norm, but the original smart devices provided limited functions, such as communication, multimedia, and memos. With the rapid development of hardware and software, only mobile devices can essentially meet more advanced requirements than the traditional geological disaster surveys. Digital surveys have been applied to varying degrees in many fields such as geological surveys, land surveys, forestry surveys, and mineral resources surveys.Mobile GIS is a comprehensive system with geospatial database as data support. This is possible through using geographic application server that can (i) provide map and geographic application services, (ii) establish data transmission between mobile client and server through wireless network communication technology, and (iii) provide mobile terminal as data collection and application tool. Mobile GIS has the characteristics of convenient mobility, real-time data, terminal independence, location relevance, information diversity, and distributed data sources. It gradually enters all walks of life and affects people’s lives. At present, GIS has entered the era of cloud computing, Internet of things, and machine learning. Machine learning and IoT can play a vital role in developing intelligent applications and GISs.Mobile GIS in the era of cloud computing and IoT is a cloud + terminal application model. The cloud focuses on map services, data storage, analysis, and calculation, IoT can help in collecting important data, and the mobile terminal pays more attention to data display and user interaction. In addition, the server and mobile terminals can be extended and developed, and the required data and functions can be integrated into the application. Whether from the perspective of rigid demand or new applications, mobile GIS will have a broader market space [1].This article is based on the open-source Android platform, combined with mobile map technology, communication technology, machine learning, and data storage technology. Aiming at the problem that the field geological disaster survey work is greatly affected by environmental factors, a task-based geological disaster survey APP based on an open-source framework is developed. The framework makes full use of open-source software to realize the collection, browsing, and display of geological disaster information, provide convenient working methods for geological disaster investigation, and improve the efficiency of geological disaster data collection though aggregation and machine learning [2]. The main contributions in this paper are as follows:(i)
Open-source Android platform is combined with mobile map, communication, and data storage technologies(ii)
A task-based geological disaster survey application based on an open-source framework is developed(iii)
Open-source software is made full use to realize the collection, browsing, and display of geological disaster information(iv)
The efficiency of geological disaster data collection through data aggregation and machine learning techniques is improvedThe rest of the paper is organized as follows. In Section2, we offer an overview of open-source platform and various key enabling technologies. Section 3 offers a brief introduction to open-source software platforms. In Section 4, the implementation technology of an IoT-based geological disaster survey APP is described. In Section 5, the application is discussed in detail along with the aggregation algorithm. Moreover, we evaluate the proposed framework using a disaster dataset. In Section 6, results are discussed. Moreover, various machine learning techniques are evaluated on the aforementioned dataset to study validity of the framework. Finally, Section 7 concludes this paper and offers several directions for further research and investigation.


## 2. Background and Related Work

Geological disasters mainly occur in areas with unstable geological conditions, such as plate junctions, and mountainous areas. Due to the large topography, frequent seismic activities, and abundant rainfall, it is easy to cause landslides, collapses, mudslides, and other geological disasters. The mountain itself has a weak network signal, and the occurrence of disasters further affects the signal strength [2, 3].There are three main modes for the development of mobile geological disaster collection APP such as (i) based on the secondary development platform provided by GIS vendors, (ii) based on mobile map API development provided by map service providers, and (iii) independent bottom development.Yu et al. [4] used ESRI’s ArcPad Application Builder secondary development software to develop customized functions for geological disaster data collection. The system has functions such as GPS or manual positioning points on the map, disaster point attribute information entry, and data storage. At the same time, the data interaction between outdoor information and indoor ArcGIS software is realized [5]. In order to solve the problems of geological disaster field investigators in identifying disaster points, photo description and positioning difficulties, and so on, three-dimensional real-world GIS was applied to the field data collection work, and the location and time of the photo shooting were correlated. Work provides support and convenience. Jiang [6] used embedded GIS technology to study the key technologies of spatial data organization and transmission, designed a mobile GIS land law enforcement dynamic inspection system, and applied it to land law enforcement inspection work, effectively improving the efficiency of land law enforcement inspection process.Zhu [7] developed a system based on the Android system that can meet the requirements of the field collection of forest resources, using OpenLayers open-source GIS to realize coordinate positioning, data display, attribute editing, and import and export of spatial data. The system can meet the business needs of the field investigation of forest resources and at the same time provide a reference for other related research. Zhang [8] designed and developed an Android-based mobile returning farmland to forest operation design and verification system. It uses UCMap for secondary development and realizes vector map loading, spatial data editing, operation design, and verification and acceptance data form entry management and positioning. Yuan [9] developed a mobile GIS agricultural information acquisition system through the Android platform. Remote sensing images and vector data are released through ArcGIS Server 10.3. The system realizes the collection, editing, uploading, and GPS positioning of agricultural land attribute data, which improves work efficiency and accuracy.Kong [1] has developed an intelligent inspection system APP for the Android system, which realizes the functions of location service, navigation, and positioning, three-dimensional map display, and so on, which improves the work efficiency of workers, reduces costs, and facilitates the management of workers. Huang [10] combined Android development technology, cloud computing, network services, and other related technologies to develop a geological cloud-based hydrogeology and water resources survey field data collection system, which realized the location, display, attribute data entry, upload, and other functions of the survey point.However, the secondary development platform provided by GIS vendors greatly simplifies the development process and has powerful functions, simple operation, and short development time [2]. However, its cost is extremely high, which is a high price for individuals or small manufacturers. Development based on the mobile map API provided by the map service provider is relatively easy to get started, and the development documents are detailed. However, as a map service provider, the functions and services it can provide are limited and cannot meet the GIS application requirements of special industries. Independent bottom-level development requires developers to independently research and design all interfaces, functions, and algorithms, which seems to reduce costs, but it takes time and tests capabilities. Products developed are difficult to compete with those developed by professional GIS vendors. The cost spent in the development process may be greater than the investment in commercial software.


## 3. Android GIS Open-Source Platform

OSMDroid is a map application development kit provided by the open-source map OpenStreetMap (OSM) based on the Android platform and can use OSM online maps [3, 11].QGIS is an open-source desktop geographic information system, developed based on Qt and System in a Package (SIP), and belongs to the official plan of the Open-Source Geospatial Foundation (OSGeo). Developers can adjust themselves under the authorization of the General Public License (GNU) Program code, and all developers can modify the program freely [12–14].Based on Android client and GeoServer map server, the Android client part includes two parts: the map view and the communication module. As the map server, GeoServer mainly provides some map services, such as map browsing, query analysis, and thematic maps. The mobile terminal communicates with the server through HTTP, Socket, and so on.


### 3.1. Key Technologies

#### 3.1.1. Development Technology

Qt is a C++-based cross-platform application development framework. After Qt5.2 version, Qt has a series of libraries, tools, plug-ins, and so on that support Android development. It includes the Qt Creator plug-in and tool set for compiling, packaging, deploying, and debugging Qt applications for the Android platform; it also includes a set of Java class libraries and Qt JNI class libraries for connecting the Java layer and C++ layer on Android. An Android program developed with Qt consists of two parts: one part is the Android part, including Android Manifest, QtApplication.java, QtActivity.java, MinistroService files, and some other resources required by the application, and the other part is the native part, including the Qt library and the cross-compiled dynamic library (.so) file [12–14]. Three-party open-source libraries similar to GDAL raster image processing library, GEOS spatial analysis library, SQLite database, expat parsing XML document, Proj map projection library, and so on are all written in C++, so you need to use Qt Creator to call the Android NDK cross-compilation tool, compile all the C++ libraries into dynamic link library files supported by Android, and then combine with Android in Qt to form a mobile application with rich GIS functions [5].


#### 3.1.2. Mobile Database

GeoPackage is an open data format developed by OGC for storing geographic information. Its storage form is independent of the platform and is implemented internally using SQLite database. GeoPackage supports a maximum storage of 140TB, which can store vector data and raster tile data such as remote sensing image pyramids, map tile matrix sets, and attribute data. GeoPackages’ vector data model uses points, lines, and polygons to describe geographic phenomena. A point is a single position in space, withX and Y coordinates, and can also have Z and M values; a curve is the basic type of all one-dimensional geometric types, it has a length but no area, and a line connects two or more in space A curve with a single point; a multisurface is the basic type of all two-dimensional geometric types. It has an area, and a polygon is composed of closed lines. The vector feature data are stored in one table, the attribute data related to the feature are stored in another table, and the graphics and attributes are connected by ID. In the raster data model, regular grid cells are used to describe the surface of the earth. Each cell contains a value that represents a certain category and can also store the attributes of the category. The position of the cell is determined by the coordinates of the top left corner vertex. The attribute information is stored in the user-defined attribute table in GeoPackage. These tables may contain attributes such as IDs or geolocation addresses that allow them to be associated with rows in other attribute tables, feature tables, or tile tables [6].


## 3.1. Key Technologies

### 3.1.1. Development Technology

Qt is a C++-based cross-platform application development framework. After Qt5.2 version, Qt has a series of libraries, tools, plug-ins, and so on that support Android development. It includes the Qt Creator plug-in and tool set for compiling, packaging, deploying, and debugging Qt applications for the Android platform; it also includes a set of Java class libraries and Qt JNI class libraries for connecting the Java layer and C++ layer on Android. An Android program developed with Qt consists of two parts: one part is the Android part, including Android Manifest, QtApplication.java, QtActivity.java, MinistroService files, and some other resources required by the application, and the other part is the native part, including the Qt library and the cross-compiled dynamic library (.so) file [12–14]. Three-party open-source libraries similar to GDAL raster image processing library, GEOS spatial analysis library, SQLite database, expat parsing XML document, Proj map projection library, and so on are all written in C++, so you need to use Qt Creator to call the Android NDK cross-compilation tool, compile all the C++ libraries into dynamic link library files supported by Android, and then combine with Android in Qt to form a mobile application with rich GIS functions [5].


### 3.1.2. Mobile Database

GeoPackage is an open data format developed by OGC for storing geographic information. Its storage form is independent of the platform and is implemented internally using SQLite database. GeoPackage supports a maximum storage of 140TB, which can store vector data and raster tile data such as remote sensing image pyramids, map tile matrix sets, and attribute data. GeoPackages’ vector data model uses points, lines, and polygons to describe geographic phenomena. A point is a single position in space, withX and Y coordinates, and can also have Z and M values; a curve is the basic type of all one-dimensional geometric types, it has a length but no area, and a line connects two or more in space A curve with a single point; a multisurface is the basic type of all two-dimensional geometric types. It has an area, and a polygon is composed of closed lines. The vector feature data are stored in one table, the attribute data related to the feature are stored in another table, and the graphics and attributes are connected by ID. In the raster data model, regular grid cells are used to describe the surface of the earth. Each cell contains a value that represents a certain category and can also store the attributes of the category. The position of the cell is determined by the coordinates of the top left corner vertex. The attribute information is stored in the user-defined attribute table in GeoPackage. These tables may contain attributes such as IDs or geolocation addresses that allow them to be associated with rows in other attribute tables, feature tables, or tile tables [6].


## 3.1.1. Development Technology

Qt is a C++-based cross-platform application development framework. After Qt5.2 version, Qt has a series of libraries, tools, plug-ins, and so on that support Android development. It includes the Qt Creator plug-in and tool set for compiling, packaging, deploying, and debugging Qt applications for the Android platform; it also includes a set of Java class libraries and Qt JNI class libraries for connecting the Java layer and C++ layer on Android. An Android program developed with Qt consists of two parts: one part is the Android part, including Android Manifest, QtApplication.java, QtActivity.java, MinistroService files, and some other resources required by the application, and the other part is the native part, including the Qt library and the cross-compiled dynamic library (.so) file [12–14]. Three-party open-source libraries similar to GDAL raster image processing library, GEOS spatial analysis library, SQLite database, expat parsing XML document, Proj map projection library, and so on are all written in C++, so you need to use Qt Creator to call the Android NDK cross-compilation tool, compile all the C++ libraries into dynamic link library files supported by Android, and then combine with Android in Qt to form a mobile application with rich GIS functions [5].


## 3.1.2. Mobile Database

GeoPackage is an open data format developed by OGC for storing geographic information. Its storage form is independent of the platform and is implemented internally using SQLite database. GeoPackage supports a maximum storage of 140TB, which can store vector data and raster tile data such as remote sensing image pyramids, map tile matrix sets, and attribute data. GeoPackages’ vector data model uses points, lines, and polygons to describe geographic phenomena. A point is a single position in space, withX and Y coordinates, and can also have Z and M values; a curve is the basic type of all one-dimensional geometric types, it has a length but no area, and a line connects two or more in space A curve with a single point; a multisurface is the basic type of all two-dimensional geometric types. It has an area, and a polygon is composed of closed lines. The vector feature data are stored in one table, the attribute data related to the feature are stored in another table, and the graphics and attributes are connected by ID. In the raster data model, regular grid cells are used to describe the surface of the earth. Each cell contains a value that represents a certain category and can also store the attributes of the category. The position of the cell is determined by the coordinates of the top left corner vertex. The attribute information is stored in the user-defined attribute table in GeoPackage. These tables may contain attributes such as IDs or geolocation addresses that allow them to be associated with rows in other attribute tables, feature tables, or tile tables [6].


## 4. Implementation Technology for Task-Based Geological Disaster Survey APP

### 4.1. Architecture

The open-source-based mobile GIS platform architecture consists of three parts: data layer, service layer, and application layer. The server uses GeoServer, the mobile database uses GeoPackage, the server database uses PosrgreSQL, the desktop client uses QGIS, and the mobile client uses QFiled. With the development of cloud computing, ordinary server can no longer meet the demand, so the latest mobile GIS platform architecture server should deploy the GIS platform on the “cloud” infrastructure in order to provide more extensive and efficient services. The overall architecture diagram of the proposed open-source framework is shown in Figure1.Figure 1
Overall architecture diagram of the proposed open-source framework.


### 4.2. Task-Based Project Configuration

The open-source framework allows users to configure the survey interface and survey content according to their needs before geological disaster surveys and can determine the completion of tasks through statistics. The survey content and survey area assigned to each person in the task-based field geological disaster survey are different, so in addition to the difference in the task name, there will be special text descriptions to describe the overall overview and targeted content of the task, help users understand the content and purpose of the task more quickly, and carry out their work more effectively.In the field survey, there are not only textual surveys but also on-site photographs to record the disaster scene. Photos are associated with their corresponding elements as attributes. The corresponding photos can be found according to the path of the photos in the attribute table, and corresponding descriptions can be added to the photos, such as the latitude and longitude when the photo was taken, and the shooting time.A disaster location requires not only the recording of disaster points to be read but also the outline of the disaster area elements. In order to avoid missing data or duplication, the two tables are associated, and the data are collected separately and finally integrated into one table. The two tables are related through the ID field. The ID field value is used to uniquely identify a record in the table and cannot be empty.After the task is completed, it is necessary to check the quantity and quality of the task completed. Therefore, when the project is deployed, set constraints on special fields to limit the scope of the collected data or use function statistics to collect the number of disasters, the area, and the length of the collection trajectory.


### 4.3. System Function

According to the business requirements of the field survey of geological disasters, the main functional modules of the system design include basic map, data collection, and GPS positioning. The functional structure diagram of the system is shown in Figure2:Figure 2
The functional structure diagram of the geological disaster survey system.


#### 4.3.1. Base Map

QgsMapCanvas is a class used to display all GIS data types on the canvas. QgsMapTool is the base class of all map tools. For example, the map pan and zoom functions are implemented based on the QgsMapToolTouch class and the QgsMapToolZoom class. The Qgsgeometry is a container of geometric objects. The actual geometric objects are stored in the container as QgsAbstractGeometry, which can be accessed through theget() method or set using the set() method, allowing access to the underlying primitive geometric objects, such as points, lines, polygons, curves, or others Geometry subclass. QgsDistanceArea can perform measurement on an existing QgsGeometry object, use measure() with QgsGeometry as a parameter, and calculate the distance or area. QgsMapLayer is the base class of all map layer types.


#### 4.3.2. Data Collection

QgsMapToolEdite and QgsMapToolIdentify inherit from QgsMapTool. QgsMapToolEdite is the base class of map tools used to edit vector geometry, and QgsMapToolIdentify is used to identify map tools in layers. The QgsFeature class encapsulates a single feature, including its id, geometry, and field/value attribute list.


#### 4.3.3. GPS Positioning

The current location can be obtained through the GPS module embedded in the smart device. The QgsGPSConnection class is used to connect to the GPS device, and QgsGPSConnection:currentGPSInformation() can return the current GPS information, such as longitude and latitude.


#### 4.3.4. Machine Learning

We use LSTM approach to extract appropriate features for further analysis on the collected dataset. First, we collect data and then manipulate it based on data aggregation technique. Figure3 displays the IoT sensor data processing, fusion, and analysis layers’ basic architecture. Various IoT sensors that can measure physical surroundings and capture real-time environment changes make up the IoT sensor data layer. Temperature, pressure, humidity, level, accelerometer, gas, gyroscopes, motion sensors, image, optical sensors, Radiofrequency Identifier (RFID) sensors, and Infrared (IR) sensors are some of the most prevalent IoT sensors. The microprocessing unit, storage unit, control unit, power system, and wireless communication interfaces are the most common IoT sensors.Figure 3
The proposed model.


## 4.1. Architecture

The open-source-based mobile GIS platform architecture consists of three parts: data layer, service layer, and application layer. The server uses GeoServer, the mobile database uses GeoPackage, the server database uses PosrgreSQL, the desktop client uses QGIS, and the mobile client uses QFiled. With the development of cloud computing, ordinary server can no longer meet the demand, so the latest mobile GIS platform architecture server should deploy the GIS platform on the “cloud” infrastructure in order to provide more extensive and efficient services. The overall architecture diagram of the proposed open-source framework is shown in Figure1.Figure 1
Overall architecture diagram of the proposed open-source framework.


## 4.2. Task-Based Project Configuration

The open-source framework allows users to configure the survey interface and survey content according to their needs before geological disaster surveys and can determine the completion of tasks through statistics. The survey content and survey area assigned to each person in the task-based field geological disaster survey are different, so in addition to the difference in the task name, there will be special text descriptions to describe the overall overview and targeted content of the task, help users understand the content and purpose of the task more quickly, and carry out their work more effectively.In the field survey, there are not only textual surveys but also on-site photographs to record the disaster scene. Photos are associated with their corresponding elements as attributes. The corresponding photos can be found according to the path of the photos in the attribute table, and corresponding descriptions can be added to the photos, such as the latitude and longitude when the photo was taken, and the shooting time.A disaster location requires not only the recording of disaster points to be read but also the outline of the disaster area elements. In order to avoid missing data or duplication, the two tables are associated, and the data are collected separately and finally integrated into one table. The two tables are related through the ID field. The ID field value is used to uniquely identify a record in the table and cannot be empty.After the task is completed, it is necessary to check the quantity and quality of the task completed. Therefore, when the project is deployed, set constraints on special fields to limit the scope of the collected data or use function statistics to collect the number of disasters, the area, and the length of the collection trajectory.


## 4.3. System Function

According to the business requirements of the field survey of geological disasters, the main functional modules of the system design include basic map, data collection, and GPS positioning. The functional structure diagram of the system is shown in Figure2:Figure 2
The functional structure diagram of the geological disaster survey system.


### 4.3.1. Base Map

QgsMapCanvas is a class used to display all GIS data types on the canvas. QgsMapTool is the base class of all map tools. For example, the map pan and zoom functions are implemented based on the QgsMapToolTouch class and the QgsMapToolZoom class. The Qgsgeometry is a container of geometric objects. The actual geometric objects are stored in the container as QgsAbstractGeometry, which can be accessed through theget() method or set using the set() method, allowing access to the underlying primitive geometric objects, such as points, lines, polygons, curves, or others Geometry subclass. QgsDistanceArea can perform measurement on an existing QgsGeometry object, use measure() with QgsGeometry as a parameter, and calculate the distance or area. QgsMapLayer is the base class of all map layer types.


### 4.3.2. Data Collection

QgsMapToolEdite and QgsMapToolIdentify inherit from QgsMapTool. QgsMapToolEdite is the base class of map tools used to edit vector geometry, and QgsMapToolIdentify is used to identify map tools in layers. The QgsFeature class encapsulates a single feature, including its id, geometry, and field/value attribute list.


### 4.3.3. GPS Positioning

The current location can be obtained through the GPS module embedded in the smart device. The QgsGPSConnection class is used to connect to the GPS device, and QgsGPSConnection:currentGPSInformation() can return the current GPS information, such as longitude and latitude.


### 4.3.4. Machine Learning

We use LSTM approach to extract appropriate features for further analysis on the collected dataset. First, we collect data and then manipulate it based on data aggregation technique. Figure3 displays the IoT sensor data processing, fusion, and analysis layers’ basic architecture. Various IoT sensors that can measure physical surroundings and capture real-time environment changes make up the IoT sensor data layer. Temperature, pressure, humidity, level, accelerometer, gas, gyroscopes, motion sensors, image, optical sensors, Radiofrequency Identifier (RFID) sensors, and Infrared (IR) sensors are some of the most prevalent IoT sensors. The microprocessing unit, storage unit, control unit, power system, and wireless communication interfaces are the most common IoT sensors.Figure 3
The proposed model.


## 4.3.1. Base Map

QgsMapCanvas is a class used to display all GIS data types on the canvas. QgsMapTool is the base class of all map tools. For example, the map pan and zoom functions are implemented based on the QgsMapToolTouch class and the QgsMapToolZoom class. The Qgsgeometry is a container of geometric objects. The actual geometric objects are stored in the container as QgsAbstractGeometry, which can be accessed through theget() method or set using the set() method, allowing access to the underlying primitive geometric objects, such as points, lines, polygons, curves, or others Geometry subclass. QgsDistanceArea can perform measurement on an existing QgsGeometry object, use measure() with QgsGeometry as a parameter, and calculate the distance or area. QgsMapLayer is the base class of all map layer types.


## 4.3.2. Data Collection

QgsMapToolEdite and QgsMapToolIdentify inherit from QgsMapTool. QgsMapToolEdite is the base class of map tools used to edit vector geometry, and QgsMapToolIdentify is used to identify map tools in layers. The QgsFeature class encapsulates a single feature, including its id, geometry, and field/value attribute list.


## 4.3.3. GPS Positioning

The current location can be obtained through the GPS module embedded in the smart device. The QgsGPSConnection class is used to connect to the GPS device, and QgsGPSConnection:currentGPSInformation() can return the current GPS information, such as longitude and latitude.


## 4.3.4. Machine Learning

We use LSTM approach to extract appropriate features for further analysis on the collected dataset. First, we collect data and then manipulate it based on data aggregation technique. Figure3 displays the IoT sensor data processing, fusion, and analysis layers’ basic architecture. Various IoT sensors that can measure physical surroundings and capture real-time environment changes make up the IoT sensor data layer. Temperature, pressure, humidity, level, accelerometer, gas, gyroscopes, motion sensors, image, optical sensors, Radiofrequency Identifier (RFID) sensors, and Infrared (IR) sensors are some of the most prevalent IoT sensors. The microprocessing unit, storage unit, control unit, power system, and wireless communication interfaces are the most common IoT sensors.Figure 3
The proposed model.


## 5. The Proposed Model

### 5.1. Study Area

The study area is the Xishan mining area in Taiyuan City, Shanxi Province, which is geographically located at 112°14′～112°32′east longitudes and 37°46′～37°57′north latitudes. The study area is shown in Figure4. The mining area is mostly in the middle mountain area, which is roughly divided into high mountain area, middle mountain area, hilly area, and alluvial plain area. Due to long-term coal mining activities in the area, many geological disasters have occurred, such as landslides, ground fissures, mudslides, and collapses. In recent years, the Xishan mining area has been continuously transformed, and the coal mining subsidence area and the ecology of the mining area have been treated, and it has also developed into a tourist base. Although geological disasters in mining areas are subject to certain control, new geological disasters will also appear at the same time. Therefore, it is necessary to conduct geological disaster surveys in a timely manner to determine the status of disasters and protect the transformation results of mining areas. The proposed framework can be easily used for the above purpose.Figure 4
Remote sensing image of the study area.


### 5.2. Function

According to the business requirements of the field survey of geological disasters, the main functional modules of the system design include basic maps, data collection, and GPS positioning.


#### 5.2.1. Base Map

Mainly the visualization and operation of the map are realized. Map operation buttons or touch functions are used to zoom in, zoom out, and pan the map. The measurement tool module includes length and area measurement.


#### 5.2.2. Data Collection

The data types that need to be collected in field investigation tasks are divided into three types: point, line, and surface. In the survey, geometric figures can be drawn through screen drawing or GPS positioning, and corresponding attribute data and multimedia can be added after drawing. In addition to adding elements, data collection also includes element deletion and element editing, which can modify the attribute data of geometric elements, edit nodes of line and area elements, and divide area elements. We also use an aggregation approach, as discussed in next section, to study the impact of deletion from the original data. However, attributes are kept unchanged.


#### 5.2.3. Data Aggregation Algorithm

The data collected through various sensors overlapping similar regions may consist of redundant data. A method is required to store only useful data. In the IoT environment, many sensors are used to collect data, and the coverage region is likely to overlap. Duplicate, useless data may be collected as a result of this overlap, putting a burden on the storage medium and subsequently on the machine learning model. In addition to lengthening latencies, time spent on training and, as a result, predicting can be wasted. As a result, the vast amount of data gathered may contain duplicate values, producing network congestion and impairing the prediction process. As a result, duplicate data must be removed using a procedure. IfDmin/Dmax is less than the predefined threshold value, the data are redundant, and only one of the i or j values is kept, while the other is destroyed. If Dmin/Dmax is greater than or equal to the threshold value, then the data are dissimilar; consequently, both data points must be taken into account during the assessment process [15, 16].(1)Dmin=minj−mini2,∀i,j=1...n,Dmax=maxj−maxi2,∀i,j=1...n.Aggregation is most effective during the data collecting stage. Algorithm1 illustrates the aggregation procedures. For each data point, we compute the Euclidean distance from Step 1 to Step 4. In Steps 5–7, we compare its value to a predefined threshold value; if the conditions are met, the data point is removed; otherwise, we move on to the next data point. It is important to note that before using the Euclidean distance measure, the data sets must be normalized. To assure the applicability of the aforementioned distance measure, a simplified normalizing function must be applied. In this paper, we employed the normalization strategy as described by the following equation [15, 17]:(2)Minorm=Mi−MminMmax−Mmin,where Mmin and Mmax are the minimum and maximum values across all data points, respectively, and Minorm is a normalized value for Mi. For example, if we want to normalize the provided data points in a dataset between 0 and 1, we will use Mmin = 0 and Mmax = 1.Algorithm 1: The data aggregation technique.
Input: Raw data in form of data set-I, that is, Mi and MjOutput: Refined data in form of data set-II, that is, Mi′ and Mj′(1)
repeat(2)
//Repeat the following steps for each elementi∈Mj where j>i;(3)
EdMi,Mj=mik−minjk2 where mik∈Mi and mjk∈Mj(4)
ifEdMi,Mj≤tdthen(5)
Remove eitherMi or Mj, to form Mi′ or Mj′(6)
end if(7)
else(8)
Do nothing(9)
end if(10)
untili∉Miorj∉Mj;


#### 5.2.4. GPS Positioning

The GPS module embedded in the smart device can be used to obtain the current position, and it can also be used to track straight lines and polygons and record continuous GPS points to achieve track recording by setting the time interval and minimum distance.


### 5.3. Work Process

The desktop is responsible for the project configuration before the field survey and the data storage and processing after the survey. In QGIS, the image data of the mining area are used as the base map, the vector data of the data collection area are configured, the appropriate map projection is selected, and the layers to be edited are set according to the research problem and the actual situation. Then, the synchronization plug-in is used to assign different projects to different personnel to realize offline tasking of data collection. Import the project to the mobile terminal, open Qfield, and compare the image map with the field to quickly find the boundary of the acquisition area. Select the layer to be edited, complete the data collection by GPS or screen drawing, and then enter the attribute information, and you can directly edit the nodes and modify the attributes of the existing changed elements. After the task is completed, synchronize the project package back to the desktop, perform attribute inspection and topology inspection in QGIS, and import the data into the PostgreSQL database for storage after the inspection is qualified. The overall process is shown in Figure5.Figure 5
The work flow chart that shows the overall process.


### 5.4. Project Preparation

The scope of the project is determined, the desktop QGIS is used for format conversion, projection settings, and layer settings for the image data, and disaster data and other related data of the research area are addressed. The configured project is packaged and imported into the geological disaster field acquisition system. The technical requirements for geological disaster risk survey evaluation (1 : 50,000) in the technical specifications are referred for the first national comprehensive risk survey of natural disasters, and the six geological disasters survey tables are designed for landslides, collapse, mudslides, ground collapse, ground subsidence, and ground fissures, such as shown in Figure6.Figure 6
Landslide survey form used in the evaluation.


### 5.5. Data Collection

Using QField, combined with the packaged project package, the geometric elements and attribute information of geological disasters are collected in the field. The collection process is shown in Figure7.Figure 7
Landslide disaster data collection interface.


### 5.6. Data Storage

After completing the data collection, save the project and export it to the computer, also import the modified data back to QGIS through the QFieldSync plug-in, and complete the data storage in QGIS or directly store the data on the server of the PostgreSQL/PostGIS database during the project configuration stage, so that the data can be accessed directly through the Internet, and it supports multiperson editing. Others can see the editing content of others in real time. This method also requires that redundancy is maintained while ensuring appropriate methods for updating the dataset. The project package is packaged into the mobile device.


## 5.1. Study Area

The study area is the Xishan mining area in Taiyuan City, Shanxi Province, which is geographically located at 112°14′～112°32′east longitudes and 37°46′～37°57′north latitudes. The study area is shown in Figure4. The mining area is mostly in the middle mountain area, which is roughly divided into high mountain area, middle mountain area, hilly area, and alluvial plain area. Due to long-term coal mining activities in the area, many geological disasters have occurred, such as landslides, ground fissures, mudslides, and collapses. In recent years, the Xishan mining area has been continuously transformed, and the coal mining subsidence area and the ecology of the mining area have been treated, and it has also developed into a tourist base. Although geological disasters in mining areas are subject to certain control, new geological disasters will also appear at the same time. Therefore, it is necessary to conduct geological disaster surveys in a timely manner to determine the status of disasters and protect the transformation results of mining areas. The proposed framework can be easily used for the above purpose.Figure 4
Remote sensing image of the study area.


## 5.2. Function

According to the business requirements of the field survey of geological disasters, the main functional modules of the system design include basic maps, data collection, and GPS positioning.


### 5.2.1. Base Map

Mainly the visualization and operation of the map are realized. Map operation buttons or touch functions are used to zoom in, zoom out, and pan the map. The measurement tool module includes length and area measurement.


### 5.2.2. Data Collection

The data types that need to be collected in field investigation tasks are divided into three types: point, line, and surface. In the survey, geometric figures can be drawn through screen drawing or GPS positioning, and corresponding attribute data and multimedia can be added after drawing. In addition to adding elements, data collection also includes element deletion and element editing, which can modify the attribute data of geometric elements, edit nodes of line and area elements, and divide area elements. We also use an aggregation approach, as discussed in next section, to study the impact of deletion from the original data. However, attributes are kept unchanged.


### 5.2.3. Data Aggregation Algorithm

The data collected through various sensors overlapping similar regions may consist of redundant data. A method is required to store only useful data. In the IoT environment, many sensors are used to collect data, and the coverage region is likely to overlap. Duplicate, useless data may be collected as a result of this overlap, putting a burden on the storage medium and subsequently on the machine learning model. In addition to lengthening latencies, time spent on training and, as a result, predicting can be wasted. As a result, the vast amount of data gathered may contain duplicate values, producing network congestion and impairing the prediction process. As a result, duplicate data must be removed using a procedure. IfDmin/Dmax is less than the predefined threshold value, the data are redundant, and only one of the i or j values is kept, while the other is destroyed. If Dmin/Dmax is greater than or equal to the threshold value, then the data are dissimilar; consequently, both data points must be taken into account during the assessment process [15, 16].(1)Dmin=minj−mini2,∀i,j=1...n,Dmax=maxj−maxi2,∀i,j=1...n.Aggregation is most effective during the data collecting stage. Algorithm1 illustrates the aggregation procedures. For each data point, we compute the Euclidean distance from Step 1 to Step 4. In Steps 5–7, we compare its value to a predefined threshold value; if the conditions are met, the data point is removed; otherwise, we move on to the next data point. It is important to note that before using the Euclidean distance measure, the data sets must be normalized. To assure the applicability of the aforementioned distance measure, a simplified normalizing function must be applied. In this paper, we employed the normalization strategy as described by the following equation [15, 17]:(2)Minorm=Mi−MminMmax−Mmin,where Mmin and Mmax are the minimum and maximum values across all data points, respectively, and Minorm is a normalized value for Mi. For example, if we want to normalize the provided data points in a dataset between 0 and 1, we will use Mmin = 0 and Mmax = 1.Algorithm 1: The data aggregation technique.
Input: Raw data in form of data set-I, that is, Mi and MjOutput: Refined data in form of data set-II, that is, Mi′ and Mj′(1)
repeat(2)
//Repeat the following steps for each elementi∈Mj where j>i;(3)
EdMi,Mj=mik−minjk2 where mik∈Mi and mjk∈Mj(4)
ifEdMi,Mj≤tdthen(5)
Remove eitherMi or Mj, to form Mi′ or Mj′(6)
end if(7)
else(8)
Do nothing(9)
end if(10)
untili∉Miorj∉Mj;


### 5.2.4. GPS Positioning

The GPS module embedded in the smart device can be used to obtain the current position, and it can also be used to track straight lines and polygons and record continuous GPS points to achieve track recording by setting the time interval and minimum distance.


## 5.2.1. Base Map

Mainly the visualization and operation of the map are realized. Map operation buttons or touch functions are used to zoom in, zoom out, and pan the map. The measurement tool module includes length and area measurement.


## 5.2.2. Data Collection

The data types that need to be collected in field investigation tasks are divided into three types: point, line, and surface. In the survey, geometric figures can be drawn through screen drawing or GPS positioning, and corresponding attribute data and multimedia can be added after drawing. In addition to adding elements, data collection also includes element deletion and element editing, which can modify the attribute data of geometric elements, edit nodes of line and area elements, and divide area elements. We also use an aggregation approach, as discussed in next section, to study the impact of deletion from the original data. However, attributes are kept unchanged.


## 5.2.3. Data Aggregation Algorithm

The data collected through various sensors overlapping similar regions may consist of redundant data. A method is required to store only useful data. In the IoT environment, many sensors are used to collect data, and the coverage region is likely to overlap. Duplicate, useless data may be collected as a result of this overlap, putting a burden on the storage medium and subsequently on the machine learning model. In addition to lengthening latencies, time spent on training and, as a result, predicting can be wasted. As a result, the vast amount of data gathered may contain duplicate values, producing network congestion and impairing the prediction process. As a result, duplicate data must be removed using a procedure. IfDmin/Dmax is less than the predefined threshold value, the data are redundant, and only one of the i or j values is kept, while the other is destroyed. If Dmin/Dmax is greater than or equal to the threshold value, then the data are dissimilar; consequently, both data points must be taken into account during the assessment process [15, 16].(1)Dmin=minj−mini2,∀i,j=1...n,Dmax=maxj−maxi2,∀i,j=1...n.Aggregation is most effective during the data collecting stage. Algorithm1 illustrates the aggregation procedures. For each data point, we compute the Euclidean distance from Step 1 to Step 4. In Steps 5–7, we compare its value to a predefined threshold value; if the conditions are met, the data point is removed; otherwise, we move on to the next data point. It is important to note that before using the Euclidean distance measure, the data sets must be normalized. To assure the applicability of the aforementioned distance measure, a simplified normalizing function must be applied. In this paper, we employed the normalization strategy as described by the following equation [15, 17]:(2)Minorm=Mi−MminMmax−Mmin,where Mmin and Mmax are the minimum and maximum values across all data points, respectively, and Minorm is a normalized value for Mi. For example, if we want to normalize the provided data points in a dataset between 0 and 1, we will use Mmin = 0 and Mmax = 1.Algorithm 1: The data aggregation technique.
Input: Raw data in form of data set-I, that is, Mi and MjOutput: Refined data in form of data set-II, that is, Mi′ and Mj′(1)
repeat(2)
//Repeat the following steps for each elementi∈Mj where j>i;(3)
EdMi,Mj=mik−minjk2 where mik∈Mi and mjk∈Mj(4)
ifEdMi,Mj≤tdthen(5)
Remove eitherMi or Mj, to form Mi′ or Mj′(6)
end if(7)
else(8)
Do nothing(9)
end if(10)
untili∉Miorj∉Mj;


## 5.2.4. GPS Positioning

The GPS module embedded in the smart device can be used to obtain the current position, and it can also be used to track straight lines and polygons and record continuous GPS points to achieve track recording by setting the time interval and minimum distance.


## 5.3. Work Process

The desktop is responsible for the project configuration before the field survey and the data storage and processing after the survey. In QGIS, the image data of the mining area are used as the base map, the vector data of the data collection area are configured, the appropriate map projection is selected, and the layers to be edited are set according to the research problem and the actual situation. Then, the synchronization plug-in is used to assign different projects to different personnel to realize offline tasking of data collection. Import the project to the mobile terminal, open Qfield, and compare the image map with the field to quickly find the boundary of the acquisition area. Select the layer to be edited, complete the data collection by GPS or screen drawing, and then enter the attribute information, and you can directly edit the nodes and modify the attributes of the existing changed elements. After the task is completed, synchronize the project package back to the desktop, perform attribute inspection and topology inspection in QGIS, and import the data into the PostgreSQL database for storage after the inspection is qualified. The overall process is shown in Figure5.Figure 5
The work flow chart that shows the overall process.


## 5.4. Project Preparation

The scope of the project is determined, the desktop QGIS is used for format conversion, projection settings, and layer settings for the image data, and disaster data and other related data of the research area are addressed. The configured project is packaged and imported into the geological disaster field acquisition system. The technical requirements for geological disaster risk survey evaluation (1 : 50,000) in the technical specifications are referred for the first national comprehensive risk survey of natural disasters, and the six geological disasters survey tables are designed for landslides, collapse, mudslides, ground collapse, ground subsidence, and ground fissures, such as shown in Figure6.Figure 6
Landslide survey form used in the evaluation.


## 5.5. Data Collection

Using QField, combined with the packaged project package, the geometric elements and attribute information of geological disasters are collected in the field. The collection process is shown in Figure7.Figure 7
Landslide disaster data collection interface.


## 5.6. Data Storage

After completing the data collection, save the project and export it to the computer, also import the modified data back to QGIS through the QFieldSync plug-in, and complete the data storage in QGIS or directly store the data on the server of the PostgreSQL/PostGIS database during the project configuration stage, so that the data can be accessed directly through the Internet, and it supports multiperson editing. Others can see the editing content of others in real time. This method also requires that redundancy is maintained while ensuring appropriate methods for updating the dataset. The project package is packaged into the mobile device.


## 6. Results and Discussion

In this section, we discuss the outcomes of the machine learning technique and data aggregation in terms of training and prediction duration. The results for two approaches, i.e., ARIMA and LSTM are shown in Figures8 and 9, respectively. This can be seen that both approaches can predict more efficiently when combined with the attention networks. Moreover, with aggregation, the data amount is significantly reduced, therefore, increasing the model training time, with almost comparable accuracy in terms of RMSE and MAPE values [15]. We noted that the attention network reduces the accuracy for ARIMA; however, for LSTM, the accuracy improvement can be as high as 50.19%. For aggregation approach, the accuracy is affected due to the amount of data available for training the model. The impact was observed between 0.58% and 2.83% when data are aggregated as shown in Figure 9.Figure 8
RMSE and MAPE metrics for ARIMA (without and with aggregation approach).Figure 9
RMSE and MAPE metrics for LSTM (without and with aggregation approach).As shown in Figure10, the data aggregation method is approximately 42.3–44.09 percent (training times) more efficient than the no aggregation approach. The attention network mechanism is more effective for prediction (∼9.08%) rather than training the model. For training the model, the attention network has an additional overhead, and we observed an increase in training durations.Figure 10
Training and prediction times (seconds).The open-source GIS function is constantly improved and has strong scalability. Developers can add different modules according to their needs. In the future, open-source software will definitely provide more reliable services and help for the government, enterprises, and individuals. Independent bottom-level development is time-consuming and labor-intensive, requires high developer capabilities, and is difficult to guarantee quality [18].


## 7. Conclusions and Future Work

The secondary development platform provided by GIS vendors simplifies the development process, but it is expensive. The free map SDK provided by map service providers is easy to develop, but it has few professional functions and is mainly used to serve the lives of the general public. In this paper, we proposed a task-based geological disaster survey APP. The APP has a geographic information system interface. Users can quickly obtain information, reduce the chance of error, support users to publish their own data, and can be extended for different applications. The data collection work of the industry can also realize the simultaneous investigation of multiple people across regions. The practical application in the Xishan mining area of Taiyuan proves that the framework can complete the collection and storage of geological disaster data, which has certain practical significance.In the future, we plan to implement more complex machine learning methods such as neural networks, deep neural networks, and convolutional neural networks. Moreover, we will use a different and more robust aggregation and fusion methods to verify the validity of the proposed model. More features of the data might be used to study the impact of data deletion and changing over the obtained results. Besides, transmission delays when the data are stored over the cloud and network edges will also be studied in our future work. These delays will have a significant impact on the application performance and, therefore, the results. Further research will be carried out to investigate how the framework should be implemented and used in real-life [19].



---

*Source: 9285258-2022-02-24.xml*