# Method and Realization of Efficient Extraction of Basic Geological Data from Two-Dimensional Mine Drawings

Authors: Xiaobo Lin
Journal: Complexity
 (2021)

---

## Abstract

In coal mining technology systems, it is very important to acquire, store, and represent basic geological data comprehensively and accurately. Based on the current working mode and information level in mining geology at coal mines, this paper proposes a process of building basic geological database for modeling of coal mines by using existing results’ data of mining geology and develops the efficient program for getting the basic geological data from the important 2D plane drawings’ achievement at mines, such as the contour maps of mine coal seam floors, geological cross-sections, underground drilling results, and geological survey results, based on AutoLISP, which is a programming language for the secondary development of AutoCAD. The obtained data in general text format is stored and managed by the MongoDB database, which realizes the storage, query, analysis, and correction of massive data of geological objects in the space of the underground coalmine. The application results show that compared with the previous data acquisition methods such as manual input and graphic transformation attribute, the extraction of spatial and attribute data from the existing mine 2D plane drawings by programming can effectively avoid the prominent problems such as artificial gross error, distortion of graph conversion, and different database structure, make the obtained spatial geological data more comprehensive, accurate, and effective, and, meanwhile, increase the rate by more than 60%, which plays an important role in data support for the construction of the geological modeling systems for transparent mines.


---

## Body

## 1. Introduction

Coal mining industry supports China’s rapid social and economic development by providing critical resources, and it will occupy a dominant position in China’s energy structure for a long time. In recent years, the technology and equipment systems for coal mining in China have been fully improved and upgraded, and the mode of coal mining has gradually shifted from mechanized and automated mining to intelligent mining. To meet the increasing demands of intelligent coal mining, it is necessary to establish a complete and reliable technology system for mining to provide effective geological support. Through the continuous efforts of coal science and technology researchers over many years, China has preliminarily developed a technology system for providing geological support for coal mines. This technology system is centrally based on high-resolution three-dimensional (3D) seismic survey, integrates surface and downhole technologies, and combines multiple techniques before and during mining. Meanwhile, technology systems characterized by the use of multisource information, 3D exploration and prediction, and whole-process support have also been developed progressively [1, 2]. The GIS software used in some coal mines both at home and abroad has been improved continuously and used widely and successfully in many mining areas in the West China where the geological conditions are relatively simple [3–5]. However, for a considerable number of old mining areas in the Central and East China where deep mining is widely adopted, geological conditions are complex and the foundation of informatization is weak, it is difficult to implement the advanced GIS management mode extensively due to the lack, incompleteness, or inaccuracy of geological data, and the geological work at coal mines in these areas mostly remains at the original stage of informatization featuring “traditional workflow + document management + drawing by AutoCAD (computer-aided design).”In 2017, Liang YUAN, a member of the Chinese Academy of Engineering, presented the scientific conception of “precision coal mining” and pointed out the direction for the intelligent development of coal mines in the future. In addition, he stated that “geophysical sciences with see-through ability are the fundamental support for precision coal mining, and it is necessary to establish an ‘Internet plus mining’ mode supported by such geophysical sciences [6]. However, it is impossible to build perfect “transparent mines” easily and instantly. Considering the basic geological technology systems being used in coal mines in China and the mode of operation thereof, it is required to improve, based on a comprehensive collection of massive and multisource heterogeneous basic geological data of coal mines, the management of coal mine geological databases, build high-resolution and dynamic 3D geological models for coal mines, fully integrate various geophysical exploration results and multiphysics monitoring data, and also continuously and deeply push forward the construction of transparent mines relying on cutting-edge technologies such as geophysical inversion and big data. Therefore, acquiring basic geological data at coal mines comprehensively and accurately has become a critical basic link to be completed before geological data which can be used at deep levels.In the past few years, quite a number of scholars have carried out many in-depth discussions and studies on the basic geological data for coal mines from the perspectives of data source, characteristics, classification and coding, storage, and management [7–13]. However, there have been few studies on the specific methods for acquiring such data. Literature [14–16] mainly analyzed the classification and spatial data extraction methods of various geological technical data in coal mines from different perspectives, studied the construction principle and data structure of spatial geological databases, and showed that the conventional data acquisition methods are still limited to manual input, graphic conversion and importing from old data based on the large amount of data, different formats, and different scales, and lack of standardization. There are some prominent problems such as too much workload, data redundancy, and poor data consistency. Therefore, in order to solve this problem, considering the current mode and informatization level of geological work at coal mines in some old mining areas in the central and eastern regions of China, the authors propose a process for building the basic geological database for coal mine modeling using existing results data of mining geology, select the key 2D mine drawings, underground geologic survey results, and underground drilling results as the objects of study, develop a series of programs using AutoLISP, a programming language for the secondary development of AutoCAD to extract the basic geological spatial data and attribute data of coal mines, use MongoDB which is a document-oriented nonrelational database for data storage and management, and continuously diversify the ways to acquire big geological data and the connotations of such data. The proposed method can provide important supporting data for building the high-resolution 3D geological models for coal mines and has great practical significance in supporting the construction of digitalized, and intelligent mines, especially in mining areas where the informatization level is relatively low.


## 2. Building of Basic Geological Database for Mine Modeling

High-resolution 3D geological models are the key carriers of intelligent coal mine applications at deep levels. The level of the completeness and accuracy of basic geological data will directly affect the precision and applicability of such geological models [17, 18]. Building a high-resolution 3D geological model is essentially a process in which spatial interpolation, entity building, and visual computing are performed based on the high-density and accurate spatial data of point objects in mining geology. Geological models that are merely based on exploratory drilling results and geological cross-sections are obviously inadequate to characterize the integrity of geological bodies, while the only geophysical exploration data cannot support the reliable and accurate interpretation of geological bodies and their attributes, and the geological inversion ability of the dynamic monitoring by microseismic, while coal mining and electromagnetic is not mature yet. For this reason, it is proposed to use existing basic geological results and data, strictly examine and select the key reliable carriers of geological data, and perform data mining using the secondary development and text processing programs and other proper means to select the high-density, highly reliable basic geological data represented in the form of spatial data of point objects in mining geology. Such practice can avoid the problems with traditional data acquisition methods, such as gross errors in manual processing, graph distortion after transformation, and inconsistency in database structure. The selected geological data can be used as the source data to build high-resolution 3D geological models.


### 2.1. Classification Characteristics of Basic Geological Data

In the current mode of geologic work at coal mines, despite the fact that there are many types of data carrier and many forms of data representation, basic geological data can generally be classified into static data and dynamic data depending on different stages of the data formation process. The main difference between the two kinds of data lies in the spatial range and storage format of data objects, and different data extraction methods are needed to obtain the full and effective spatial data of mining geological objects.Static data refers to the geological and technical data that is accumulated continuously from the early exploration stage, proven reliable in practice, and used to guide the production and management of coal mines. Static data is mainly stored in the form of 2D engineering drawing (drawing by AutoCAD) and data table of key geological control points (editing by Microsoft Office). Among 2D engineering drawings for coal mines, the contour maps of coal seam floors, reserve estimation drawings, and geological cross-sections for exploration lines contain a variety of key geological data that is reliable, comprehensive, and accurate and are used as critical technical materials to guide the production and management of coal mines. Data tables of key geological control points include tables of exploratory drilling results, tables of coal starting points, and tables of large and medium geological structures. The data of coal seams and faults recorded in such tables can be crosschecked with the data indicated in mine drawings.Dynamic data refers to the data of local geological points that is generated dynamically in the process of production and supplementary explorations and also includes the real-time response data of the electromagnetic and microseismic method obtained from dynamic monitoring of mining activities. Among them, geological survey and drilling results data storage mode is relatively primitive, which is usually recorded in the form of paper chart or Excel spreadsheet, so the target data needs to be calculated on the basis of digitization. Geophysical and geochemical exploration results and real-time monitoring data results are usually stored in special graphic data and converted into interpretation result data. The dynamic data from different sources are fused and confirmed by each other. The derived spatial data of geological objects have high credibility and data density, which can significantly improve the precision of geological control in local areas in coal mines and can be used to further improve or correct mine drawings and other technical materials. Compared with static data, dynamic data is more important in building the model of mining geology. First of all, the dynamic data act on the local specific spatial scope of the mine, which can constantly modify the geological model established based on the static data, improves the local geological control accuracy, adjusts the coal seam undulation shape and the precise position and occurrence parameters of faults, and also provides reference for the large-scale analysis of structures. On the contrary, through the structure’s development revealed by the project compared with the seismic time profile and seismic attributes, this paper summarizes the interpretation rules of mine seismic geological structure, so as to make better use of the existing 3D seismic interpretation results to carry out dynamic and fine geological prediction and prediction in the vicinity of mining engineering.


### 2.2. Process for Building the Basic Geological Database for Coal Mine Modeling

As static geological data differs greatly from dynamic geological data in terms of spatial range and storage format, well-targeted techniques should be used to acquire massive and high-density spatial geological data from the static and dynamic data in order to meet the demands of high-resolution 3D geological modeling of coal mines. Therefore, a process for building the basic geological database for coal mine modeling using existing results’ data of mining geology is proposed. In this process, massive spatial data of geological objects stored in general text formats is acquired through data extraction, analysis, and computing using a programming language for the secondary development of AutoCAD and text processing programs. The acquired data is stored and managed in MongoDB databases [19] to allow for convenient data query, analysis, and correction and is used as the source data to build the high-resolution 3D geological models for coal mines. The flowchart of this process is shown in Figure 1.Figure 1
Flowchart of the process for building the basic geological database for coal mine modeling.The spatial data of geological objects mainly includes data of the spatially discrete points of coal seams and faults in coal mines. Such data is stored in general text formats and can be stored in MongoDB databases after it is transformed to the format of BSON key/value pair. A tremendous amount of object files are managed using two data collections for coal seams and faults, and the 3D geospatial attributes and various geological attributes of geological bodies are stored and managed in a unified manner. MongoDB databases can be structured flexible and support dynamically added object and attribute fields to allow for the efficient query and processing of a wide variety of spatial object and attribute data. The general data structure of a coal seam data collection is given below as an example.{_id: ObjectId(“5d57a275724dca9350331074”),mcbh:11-2,dly:”underground disclosed”,gis: {x:85401.366, y:48957.002 },z:-956.6,mh:2.3,phlx:1,ws:3.5,floor:{yx:”mudstone”,yh:2.6},bottom: {yx:” sandy mudstone”,yh:5.1},dwz:{cq:”E1”,gzm:”1111(1)”,hd:” 1111(1) transport channel” },img:1111(1)ys-8.jpg,date:”2018-08-08 00 : 00 : 00”}.In the data structure of coal seam point data collection, each point data is numbered by the unique object ID automatically generated by the system, and the content covers the spatial position information of coal seam points (x, y, z) and a variety of attribute information such as the roadway, mining area, coal seam name, coal seam thickness, rock properties, and thickness of the roof and floor. In addition, this data structure also supports the storage of image format information to meet the requirements of combination, query, and correction of subsequent multidimensional spatial data of geological objects.The discrete spatial data of geological objects is the most fundamental element for building geological databases for coal mines. In MongoDB, two-dimensional spatial objects such as lines and polygons can be represented by arrays that are composed of discrete point data. A composite index can be created by combining the stratigraphic or elevation attributes revealed in such data, and the query and composite computing of spatial and attribute data of mining geological objects within the 3D spatial range can be performed using query operators such as geoWithin and geoIntersects and near, as well as the built-in MapReduce computational framework.To ensure the reliability of basic geological data stored in databases, some static data can be replaced by newly acquired dynamic data or the old and new data can be mathematically fitted in order to continuously reduce data errors and improve data consistency. Additionally, after a 3D geological model is built on a specific platform based on basic geological database comparing with mining engineering data, the model can be adjusted locally using dynamic data as control points, and mining engineering data can be imported. Compared with 2D drawings, 3D models provide the opportunity to detect and deal with anomalous data more easily and can better ensure data quality.Undoubtedly, high-resolution 3D geological modeling of coal mines has spatial restrictions. Successful modeling depends on the quality and density of “hard data,” such as drilling data and uncovered data. For mining fields where some mining activities or high-density supplementary explorations have been carried out, the precision and accuracy of modeling can be improved by performing spatial analysis and geological modeling using the basic geological data that has been collected. For mining fields that have not been developed, it is not possible to improve the precision of geological modeling fundamentally, and the improvement of modeling precision mainly replies on the fine interpretation of 3D seismic survey result data, the comparison and summary of exploration, and mining effect and integrated analysis incorporating other geophysical exploration data.


## 2.1. Classification Characteristics of Basic Geological Data

In the current mode of geologic work at coal mines, despite the fact that there are many types of data carrier and many forms of data representation, basic geological data can generally be classified into static data and dynamic data depending on different stages of the data formation process. The main difference between the two kinds of data lies in the spatial range and storage format of data objects, and different data extraction methods are needed to obtain the full and effective spatial data of mining geological objects.Static data refers to the geological and technical data that is accumulated continuously from the early exploration stage, proven reliable in practice, and used to guide the production and management of coal mines. Static data is mainly stored in the form of 2D engineering drawing (drawing by AutoCAD) and data table of key geological control points (editing by Microsoft Office). Among 2D engineering drawings for coal mines, the contour maps of coal seam floors, reserve estimation drawings, and geological cross-sections for exploration lines contain a variety of key geological data that is reliable, comprehensive, and accurate and are used as critical technical materials to guide the production and management of coal mines. Data tables of key geological control points include tables of exploratory drilling results, tables of coal starting points, and tables of large and medium geological structures. The data of coal seams and faults recorded in such tables can be crosschecked with the data indicated in mine drawings.Dynamic data refers to the data of local geological points that is generated dynamically in the process of production and supplementary explorations and also includes the real-time response data of the electromagnetic and microseismic method obtained from dynamic monitoring of mining activities. Among them, geological survey and drilling results data storage mode is relatively primitive, which is usually recorded in the form of paper chart or Excel spreadsheet, so the target data needs to be calculated on the basis of digitization. Geophysical and geochemical exploration results and real-time monitoring data results are usually stored in special graphic data and converted into interpretation result data. The dynamic data from different sources are fused and confirmed by each other. The derived spatial data of geological objects have high credibility and data density, which can significantly improve the precision of geological control in local areas in coal mines and can be used to further improve or correct mine drawings and other technical materials. Compared with static data, dynamic data is more important in building the model of mining geology. First of all, the dynamic data act on the local specific spatial scope of the mine, which can constantly modify the geological model established based on the static data, improves the local geological control accuracy, adjusts the coal seam undulation shape and the precise position and occurrence parameters of faults, and also provides reference for the large-scale analysis of structures. On the contrary, through the structure’s development revealed by the project compared with the seismic time profile and seismic attributes, this paper summarizes the interpretation rules of mine seismic geological structure, so as to make better use of the existing 3D seismic interpretation results to carry out dynamic and fine geological prediction and prediction in the vicinity of mining engineering.


## 2.2. Process for Building the Basic Geological Database for Coal Mine Modeling

As static geological data differs greatly from dynamic geological data in terms of spatial range and storage format, well-targeted techniques should be used to acquire massive and high-density spatial geological data from the static and dynamic data in order to meet the demands of high-resolution 3D geological modeling of coal mines. Therefore, a process for building the basic geological database for coal mine modeling using existing results’ data of mining geology is proposed. In this process, massive spatial data of geological objects stored in general text formats is acquired through data extraction, analysis, and computing using a programming language for the secondary development of AutoCAD and text processing programs. The acquired data is stored and managed in MongoDB databases [19] to allow for convenient data query, analysis, and correction and is used as the source data to build the high-resolution 3D geological models for coal mines. The flowchart of this process is shown in Figure 1.Figure 1
Flowchart of the process for building the basic geological database for coal mine modeling.The spatial data of geological objects mainly includes data of the spatially discrete points of coal seams and faults in coal mines. Such data is stored in general text formats and can be stored in MongoDB databases after it is transformed to the format of BSON key/value pair. A tremendous amount of object files are managed using two data collections for coal seams and faults, and the 3D geospatial attributes and various geological attributes of geological bodies are stored and managed in a unified manner. MongoDB databases can be structured flexible and support dynamically added object and attribute fields to allow for the efficient query and processing of a wide variety of spatial object and attribute data. The general data structure of a coal seam data collection is given below as an example.{_id: ObjectId(“5d57a275724dca9350331074”),mcbh:11-2,dly:”underground disclosed”,gis: {x:85401.366, y:48957.002 },z:-956.6,mh:2.3,phlx:1,ws:3.5,floor:{yx:”mudstone”,yh:2.6},bottom: {yx:” sandy mudstone”,yh:5.1},dwz:{cq:”E1”,gzm:”1111(1)”,hd:” 1111(1) transport channel” },img:1111(1)ys-8.jpg,date:”2018-08-08 00 : 00 : 00”}.In the data structure of coal seam point data collection, each point data is numbered by the unique object ID automatically generated by the system, and the content covers the spatial position information of coal seam points (x, y, z) and a variety of attribute information such as the roadway, mining area, coal seam name, coal seam thickness, rock properties, and thickness of the roof and floor. In addition, this data structure also supports the storage of image format information to meet the requirements of combination, query, and correction of subsequent multidimensional spatial data of geological objects.The discrete spatial data of geological objects is the most fundamental element for building geological databases for coal mines. In MongoDB, two-dimensional spatial objects such as lines and polygons can be represented by arrays that are composed of discrete point data. A composite index can be created by combining the stratigraphic or elevation attributes revealed in such data, and the query and composite computing of spatial and attribute data of mining geological objects within the 3D spatial range can be performed using query operators such as geoWithin and geoIntersects and near, as well as the built-in MapReduce computational framework.To ensure the reliability of basic geological data stored in databases, some static data can be replaced by newly acquired dynamic data or the old and new data can be mathematically fitted in order to continuously reduce data errors and improve data consistency. Additionally, after a 3D geological model is built on a specific platform based on basic geological database comparing with mining engineering data, the model can be adjusted locally using dynamic data as control points, and mining engineering data can be imported. Compared with 2D drawings, 3D models provide the opportunity to detect and deal with anomalous data more easily and can better ensure data quality.Undoubtedly, high-resolution 3D geological modeling of coal mines has spatial restrictions. Successful modeling depends on the quality and density of “hard data,” such as drilling data and uncovered data. For mining fields where some mining activities or high-density supplementary explorations have been carried out, the precision and accuracy of modeling can be improved by performing spatial analysis and geological modeling using the basic geological data that has been collected. For mining fields that have not been developed, it is not possible to improve the precision of geological modeling fundamentally, and the improvement of modeling precision mainly replies on the fine interpretation of 3D seismic survey result data, the comparison and summary of exploration, and mining effect and integrated analysis incorporating other geophysical exploration data.


## 3. Algorithm and Program-Based Realization of Geological Data Extraction

### 3.1. Introduction to AutoLISP

AutoLISP is a LISP (List Processing) programming language for the secondary development of AutoCAD developed by American Autodesk, Inc. Among the many AutoCAD development tools, AutoLISP is the easiest to use and most widely used tool that attracts extensive attention from many geological engineers and technicians engaged in coal mine engineering.In this paper, a series of programs are developed to efficiently extract useful spatial and attribute data of mining geology from engineering drawings, underground drilling results, and other two-dimensional CAD drawings, and static data is replaced with dynamic data. The data volumes generated provide the basic support for 3D modeling and informatization of coal mines.


### 3.2. Extraction of Basic Geological Data from 2D Drawings

#### 3.2.1. Extraction of Spatial and Multiattribute Data of Geological Points from Contour Maps of Coal Seam Floors

Contour maps of coal seam floors are the first-hand geological data uncovered by exploratory drilling or mining or obtained through downhole drilling, which are compiled after interpolation and calculation based on the laws of geology and the results of geophysical explorations. Such maps contain abundant highly reliable data reflecting the spatial locations and multiple attributes of geological points, such as coal seam thickness, hydrological conditions, and marsh gas, and are used as the most important technical materials by coal mines to perform engineering design, safety management, and reserve estimation. Massive data reflecting the spatial locations and multiple attributes of geological points can be extracted from these contour maps and used for building the high-resolution 3D geological models for coal mines. The detailed procedure for extracting useful geological data from contour maps is described below:(1)
Set the plot scale to 1 : 1 and use the world coordinate system (WCS); rotate the drawing and make sure the due north on the drawing coincides with the coordinate system’sy-axis and the coordinates of grids are consistent with the actual coordinates(2)
Select the contour lines with the same value on the map one by one to create a selection set, and select graphic elements in the selection set one by one using a cyclic execution command(3)
For each graphic element, obtain the sublists of items with specified key-value in the graphic element information list and find the corresponding coordinates and attribute values, and output the serial numbers, coordinates, and attribute values of graphic elements to the specified files; meanwhile, mark changes to the colors of selected graphic elements


#### 3.2.2. Extraction of Data Reflecting the Spatial Locations of Geological Points and Coal Seam Thickness from Geological Cross-Sections

Geological cross-sections are plotted based on the results of exploratory drilling and the geological information collected during actual mining. Geological cross-sections reflect the real spatial relationships between geological bodies and mining activities and serve as the critical materials for geological engineers and technicians to establish the concept of mining space and analyze technical issues. The geological data contained in geological cross-sections is generally consistent with the data in 2D drawings. In geological cross-sections, the spatial data of geological objects for locations, near which mining activities are carried out, may be more accurate and is usually crosschecked with the data of geological points indicated in 2D drawings. The detailed procedure for extracting useful space and attribute data of geological body from geological cross-sections is described below:(1)
Open a geological cross-section and its corresponding plan in the same model space, set the plot scale to 1 : 1, and use the world coordinate system (WCS).(2)
Use the two horizontal endpoints in the cross-section as control points A’ and B’, and find the coordinates of their corresponding planar positions A and B (point A on the left and point B on the right): A(x1, y1, 0) and B(x2, y2, 0)(3)
Get angleang between the AB vector straight line and the positive direction of the x-axis in the coordinate system; rotate (counterclockwise) the cross-section ang degrees based on point A; move the cross-section with the base point in a parallel way. Rotate the cross-section to allow points A’ and B’ to move to the positions of points A and B in the 2D drawing so that the coordinates of points A and B in the WCS are consistent with the x-y planar coordinates of their actual spatial coordinates.(4)
Let any point of a coal seam floor shown in the cross-section beP, its coordinates in the WCS be (xt, yt), and its real spatial coordinates to be found be (x, y, z); call the subprogram to calculate the distance of vertical projection ds of point P onto the AB straight line.(5)
Select P points in batch, calculate their coordinates by interpolation according to formula (1), and output the calculated coordinates into the specified txt file:(1)x=x1+x1−xt2+y1−yt2−ds2x1−x22+y1+y22x2−x1,y=y1+x1−xt2+y1−yt2−ds2x1−x22+y1+y22y2−y1,z=−ds.


### 3.3. Extraction of Downhole Geological Survey and Drilling Results

#### 3.3.1. Results of Geological Survey on Excavation Working Face

The foremost information on geological bodies can be obtained by performing geological surveys on excavation working faces. The results of such geological surveys are important references for analyzing local geological conditions and predicting the geological conditions in the forward direction and can directly affect the accuracy and timeliness of geological modeling. When no fault is encountered along the coal roadway, it is relatively simple to obtain the geological results and data for coal seam floors by calculation based on the basic parameters of geological survey. According to the requirements on geological survey for roadway excavation specified in theRegulations on Geological Work at Coal Mines (China) and considering the needs of accurate modeling, it is required to acquire geological data for coal seam points at a spacing of about 10 m, i.e., one coal seam point per 10 m. The real difficulty lies in the fact that it is not possible to directly acquire the accurate fault location and occurrence parameters data due to environmental reasons or safety risk when any fault is encountered along the coal roadway. It is necessary to analyze and calculate the fault location and occurrence parameters based on available field geological survey data. These faults are shown in Figure 2. Figure 2(a) shows a fault cutting through both sides of the roadway, and Figure 2(b) shows a fault cutting through one side of the roadway and the heading face.Figure 2
Diagram of calculation parameters for faults cutting the roadway. (a) A fault cutting through both sides of the roadway. (b) A fault cutting through one side of the roadway and the heading face.
(a)(b)Taking the first case shown in Figure2(a) as an example, for the excavated rectangular roadway cut by a fault, the azimuth is azi, the angle of slope is θ, the width is k, the coordinates of point P nearest to the heading face are (px, py, pz), the distances from the upper points of intersection between the fault plane and the left and right rides of the roadway to point P are d1 and d2, and the average value of pseudodip angles between the fault and roadway sides is α (the pseudodip angles between the fault and the left and right sides of the roadway are usually slightly different). Using these parameters, the coordinates (fx, fy, fz) of the fault location, which is calculated according to the intersection point of roof and fault plane on the central line of roadway, true dip direction fqx, and true dip angle fqj of the fault can be calculated according to(2)fx=px+cosθcosπ/2−azid1+d22,fy=py+cosθsinπ/2−azid1+d22,fz=pz+sinθd1+d22,fqx=azi−π−arctand2−d1k,fqj=arctantanαabscosfqx.The aforementioned calculations, data storage, and the drafting of 2D drawings of fault location and occurrence parameters under complex conditions are completed using the programs developed in this study. The main codes used in these programs are listed below.(defun c:faultcg()(setvar “cmdecho” 0)(setq osm (getvar “osmode”))(setvar “osmode” 0)(setqP (getpoint “please select the location of measure point on the screen:”))(command “circle”p 0.25)(command “text“p 1 0 “P”””)(setq px (getreal “please enter thex-coordinate of measure point P:”))(setq py (getreal “please enter they-coordinate of measure point P:”))(setq pz (getreal “please enter the elevation of measure pointP:”))(setq Azi (getreal “please enter the roadway azimuth ”))(setq azi (/(∗ azi pi) 180)); convert angle to radian measure(setq ll (getreal “please enter the distance from the point of intersection between the fault plane and the left side of the roadway to measure pointP:”))(setq lr (getreal “please enter the distance from the point of intersection between the fault plane and the right side of the roadway to measure pointP:”))(setq ly (getreal “please enter the distance from the heading face to measure pointP:”))(setqp1 (polar p (/(∗1 pi) 2) (/k 2)))(setqy1 (polar p1 0 ll))(setqy2 (polar y1 (/(∗3 pi) 2) 5))(setqp2 (polar p1 (/(∗3 pi) 2) 5))(command “pline“p1 y1 y2 p2””)(setqf1 (polar p1 0 ll))(setqf2 (polar p2 0 lr))(command “color” “red”)(command “pline“f1 f2””)(setq dip (getreal “please enter the slope of the roadway:”))(setqh (getreal “please enter the fault throw:”))(setq wqj (getreal “please enter the pseudodip angles between the fault and roadway sides:”))(setq wqj (/(∗wqj pi) 180))(setq ang (anglef2 f1))(setq For B (getstring “please confirm if the dip direction of the fault coincides with the direction of roadway excavation: <y or n>”))(setq ds (distancef1 f2))(setqf (polar f2 ang (∗0.5 ds)))(setqf3 (polar f ang 1))(setqf4 (polar f (- ang pi) 1))(if (eq ForB “y”)(Progn(setq f-qx (- ang (∗0.5 pi)))(setq zqj (atan (/(tan wqj) (cos f-qx))))(setq zqj (∗180 (/zqj pi)))(setq ff (polarf f-qx 2))(setqf5 (polar f3 f-qx 1))(setqf6 (polar f4 f-qx 1))(command “line“f ff””)(command “line“f3 f5””)(command “line“f4 f6””))(Progn(setqf-qx (+ang (∗0.5 pi)))(setq ff (polarf f-qx 2))(setqf5 (polar f3 f-qx 1))(setqf6 (polar f4 f-qx 1))(command “line“f ff””)(command “line“f3 f5””)(command “line“f4 f6””)))(setqf-qx (∗180 (/f-qx pi)))(princ “\n parameters of fault occurrence: ”)(princ (rtosf-qx))(princ “degrees”)(princ “<”)(princ (rtos zqj))(princ “degrees”)(setq tazi (- (∗0.5 pi) azi))(setq fdis (/(+ll lr) 2))(setq fdis (∗fdis (cos dip)))(setq fx (+px (∗fdis (cos tazi))))(setq fy (+py (∗fdis (sin tazi))))(setq fz (+pz (∗fdis (sin dip))))(princ “\n fault location:”)(princ “\n X = ”)(princ rtos fx)(princ “\n Y = ”)(princ rtos fy)(princ “\n Z = ”)(princ rtos fz)(setq file (open “D: \\dccg.txt” “a”))(write-line (strcat (rtos fx 2 4) “ ” (rtos fy 2 4) “ ” (rtos fz 2 4) “ ”(rtos f-qx 2 4) “ ”(rtos zqj 2 4)) file); please output the coordinates of the point of intersection between the fault plane and the roadway’s top center line, and the parameters of fault occurrence(close file)(command “color” “bylayer”)(setvar “osmode” osm)(princ))(defun tan(A); define tan() function(if (= (cosA) 0)(sinA)(/(sinA) (cos A)))).In Figure2(b), d2 is the distance from the intersection point of the fault plane and the top of the heading face to the roadway ride which is cut by the fault and β is the pseudodip angle of fault plane at the heading face. Other parameters are consistent with Figure 2(a). The idea of data calculation and programming is similar, so it will not be repeated here.


#### 3.3.2. Results of Geological Survey on Mining Working Face

Abundant high-density 3D spatial data of coal seams and faults can be obtained by performing geological surveys on mining working faces. Such geological surveys provide massive basic data that is comprehensive and reliable for building high-resolution 3D geological models of working faces and lay solid foundations for the precise prediction of geological conditions in the forward direction and the accurate calculation of the amounts of coal recovered and lost at working faces. The results of geological surveys on mining working faces are usually concentrated in the two-dimensional plane drawings of the working face. The extraction of corresponding space and attribute data of geological objects is realized according to the following ideas:(1)
Set the plot scale of 2D working face drawings to 1 : 1, use the user coordinate system (UCS), and find the coordinates of point A (xa, ya) and point B (xb, yb) at two endpoints of the working face on the coal seam roof and the distance between points A and B and the corresponding coordinates za and zb on the coal seam roof, as well as coal thicknesses ha and hb.(2)
Select any coal seam pointPn or point of intersection Fn between the fault plane and the supported roof of the roadway (the coal seam point should be located in the coal seam floor, and the fault point shall be located in the roof of the supports) and find the straight distance ln from the selected point to point A and dip angle θ.(3)
Calculate coordinates (xn, yn, zn) of the surveyed coal seam point and fault point by linear interpolation according to formula (3) and output the calculated results together with the corresponding coal thickness hn and mining height cg to the specified files for storage:(3)xn=xa−lncosθxa−xbL,yn=ya−lncosθya−ybL,zn=za+lnsinθ.


#### 3.3.3. Underground Drilling Results

To compensate for the lack of precision in surface geological explorations and improve the geological control of coal seams in the mining space, underground geological drilling is usually performed in advance before further mining activities are carried out. In addition, when the gas in surrounding coal seams needs to be drained using the roadways arranged in the strata of coal seam floors and roofs to eliminate the risk of outburst, a large number of boreholes penetrating the coal seams also need to be drilled. Using the calculated results of the locations and thicknesses of coal seams discovered by drilling, the characteristics of occurrence, structure, and distribution of these coal seams can be identified accurately, thus providing reliable supporting data for the optimal design and safe construction of mining heads and working faces. The underground geological drilling results and incline-measure data are usually recorded and stored in the form of Excel spreadsheet, and the record format is shown in Tables1 and 2.Table 1
Original data table of underground geological drilling results.
No.xyzDip (°)Azimuth (°)Depth of coal starting point (m)Depth of coal ending point (m)Final depth (m)Roadway name129797.08287828.686−447.8−2910141.547.653Roof roadway of 1321229797.08287828.686−447.3−59.41926.227.529.8Roof roadway of 1321Table 2
Original incline-measure data table of an underground geological borehole.
Measuring depth no.Distance between measuring pointsLi (m)Borehole vertex angleθi (°)Borehole azimuthalγi (°)000.000.00153.50115.30233.60116.40333.50114.60433.10115.30533.50116.70To determine the locations and thicknesses of coal starting points discovered by drilling, it is necessary to perform calculation and inversion of drilling operation parameters and lithological records. In traditional inversion methods, drilling parameters and lithological records are manually calculated using mathematical formulas or calculated using CAD drawings and then projected onto cross-sections and 2D drawings. These traditional methods are characterized by very complex calculations and low efficiency, especially when borehole incline-measure data is involved.For these reasons, a spatial mathematical model for borehole inversion is built based on the spatial relationships among borehole drilling parameters, results, and data, and the quick computation of target coal seams is achieved using AutoLISP. The proposed solution is more efficient that the traditional inversion methods. The programming idea and algorithms for the proposed solution are introduced below:(1)
Call the ActiveX object function to open the excel spreadsheet recording drilling results, convert each row of data in the excel spreadsheet to series, and find borehole numberzkbh, design azimuth α; design dip angle β borehole coordinates (x, y, z), depth of coal starting point lj, and depth of coal ending point lz.(2)
Calculate the coordinates of coal starting point (xj0, yj0, zj0) and coal ending point (xz0, yz0, zz0) in the borehole without inclination measurement data using formulas (4) and (5):(4)xj0=x+ljcosαsinβ,yj0=y+ljsinαsinβ,zj0=z±ljsinβ,(5)xz0=x+lzcosαsinβ,yz0=y+lzsinαsinβ,zz0=z±lzsinβ.It should be noted that when the drilling direction is from the bottom to top, the right part of calculation formulas ofzj0 and zz0 takes “−” and, when the drilling construction direction is from top to bottom, it takes “+” sign.(3)
Load the excel spreadsheet containing inclination measurement results and data, find lengthsl1, l2, …ln of n borehole sections in which the inclination is measured, measured dip angles θ1, θ2, …, θn, and measured azimuths γ1, γ2, …, γn.(4)
Determine the relationship between the depth of coal starting pointlj, depth of core ending point lz, and cumulative depth ∑i=1kli of borehole sections in which the inclination is measured. In ∑i=1kli, k is an integer, and 1 ≤ k < n.(5)
Calculate the values of inclination Δxj, Δyj, Δzj and Δxz, Δyz, Δzz at the corresponding coal starting and ending points using iteration formulas (6) and (7):(6)Δxj=Δxk+lj−∑i=1klicosθk+1cosγk+1,Δyj=Δyk+lj−∑i=1klicosθk+1sinγk+1,Δzj=Δzk+lj−∑i=1klisinθk+1,(7)Δxz=Δxk+lz−∑i=1klicosθk+1cosγk+1,Δyz=Δyk+lz−∑i=1klicosθk+1sinγk+1,Δzz=Δzk+lz−∑i=1klisinθk+1.(6)
Use the calculated values of borehole inclination to correct the three components of the coordinates of coal starting and ending points calculated without inclination measurement data in step (2) according to formulas (8) and (9), find the coordinates of actual coal starting point (xj, yj, zj), the coordinates of actual coal ending point (xz, yz, zz), and coal seam vertical thickness (zz−zj)sinθn (which is approximately equal to coal seam thickness when the coal seam is slightly inclined), and input these data to the specified file:(8)xj=xj0+Δxj,yj=yj0+Δyj,zj=zj0+Δzj,(9)xz=xz0+Δxz,yz=yz0+Δyz,zz=zz0+Δzz.


## 3.1. Introduction to AutoLISP

AutoLISP is a LISP (List Processing) programming language for the secondary development of AutoCAD developed by American Autodesk, Inc. Among the many AutoCAD development tools, AutoLISP is the easiest to use and most widely used tool that attracts extensive attention from many geological engineers and technicians engaged in coal mine engineering.In this paper, a series of programs are developed to efficiently extract useful spatial and attribute data of mining geology from engineering drawings, underground drilling results, and other two-dimensional CAD drawings, and static data is replaced with dynamic data. The data volumes generated provide the basic support for 3D modeling and informatization of coal mines.


## 3.2. Extraction of Basic Geological Data from 2D Drawings

### 3.2.1. Extraction of Spatial and Multiattribute Data of Geological Points from Contour Maps of Coal Seam Floors

Contour maps of coal seam floors are the first-hand geological data uncovered by exploratory drilling or mining or obtained through downhole drilling, which are compiled after interpolation and calculation based on the laws of geology and the results of geophysical explorations. Such maps contain abundant highly reliable data reflecting the spatial locations and multiple attributes of geological points, such as coal seam thickness, hydrological conditions, and marsh gas, and are used as the most important technical materials by coal mines to perform engineering design, safety management, and reserve estimation. Massive data reflecting the spatial locations and multiple attributes of geological points can be extracted from these contour maps and used for building the high-resolution 3D geological models for coal mines. The detailed procedure for extracting useful geological data from contour maps is described below:(1)
Set the plot scale to 1 : 1 and use the world coordinate system (WCS); rotate the drawing and make sure the due north on the drawing coincides with the coordinate system’sy-axis and the coordinates of grids are consistent with the actual coordinates(2)
Select the contour lines with the same value on the map one by one to create a selection set, and select graphic elements in the selection set one by one using a cyclic execution command(3)
For each graphic element, obtain the sublists of items with specified key-value in the graphic element information list and find the corresponding coordinates and attribute values, and output the serial numbers, coordinates, and attribute values of graphic elements to the specified files; meanwhile, mark changes to the colors of selected graphic elements


### 3.2.2. Extraction of Data Reflecting the Spatial Locations of Geological Points and Coal Seam Thickness from Geological Cross-Sections

Geological cross-sections are plotted based on the results of exploratory drilling and the geological information collected during actual mining. Geological cross-sections reflect the real spatial relationships between geological bodies and mining activities and serve as the critical materials for geological engineers and technicians to establish the concept of mining space and analyze technical issues. The geological data contained in geological cross-sections is generally consistent with the data in 2D drawings. In geological cross-sections, the spatial data of geological objects for locations, near which mining activities are carried out, may be more accurate and is usually crosschecked with the data of geological points indicated in 2D drawings. The detailed procedure for extracting useful space and attribute data of geological body from geological cross-sections is described below:(1)
Open a geological cross-section and its corresponding plan in the same model space, set the plot scale to 1 : 1, and use the world coordinate system (WCS).(2)
Use the two horizontal endpoints in the cross-section as control points A’ and B’, and find the coordinates of their corresponding planar positions A and B (point A on the left and point B on the right): A(x1, y1, 0) and B(x2, y2, 0)(3)
Get angleang between the AB vector straight line and the positive direction of the x-axis in the coordinate system; rotate (counterclockwise) the cross-section ang degrees based on point A; move the cross-section with the base point in a parallel way. Rotate the cross-section to allow points A’ and B’ to move to the positions of points A and B in the 2D drawing so that the coordinates of points A and B in the WCS are consistent with the x-y planar coordinates of their actual spatial coordinates.(4)
Let any point of a coal seam floor shown in the cross-section beP, its coordinates in the WCS be (xt, yt), and its real spatial coordinates to be found be (x, y, z); call the subprogram to calculate the distance of vertical projection ds of point P onto the AB straight line.(5)
Select P points in batch, calculate their coordinates by interpolation according to formula (1), and output the calculated coordinates into the specified txt file:(1)x=x1+x1−xt2+y1−yt2−ds2x1−x22+y1+y22x2−x1,y=y1+x1−xt2+y1−yt2−ds2x1−x22+y1+y22y2−y1,z=−ds.


## 3.2.1. Extraction of Spatial and Multiattribute Data of Geological Points from Contour Maps of Coal Seam Floors

Contour maps of coal seam floors are the first-hand geological data uncovered by exploratory drilling or mining or obtained through downhole drilling, which are compiled after interpolation and calculation based on the laws of geology and the results of geophysical explorations. Such maps contain abundant highly reliable data reflecting the spatial locations and multiple attributes of geological points, such as coal seam thickness, hydrological conditions, and marsh gas, and are used as the most important technical materials by coal mines to perform engineering design, safety management, and reserve estimation. Massive data reflecting the spatial locations and multiple attributes of geological points can be extracted from these contour maps and used for building the high-resolution 3D geological models for coal mines. The detailed procedure for extracting useful geological data from contour maps is described below:(1)
Set the plot scale to 1 : 1 and use the world coordinate system (WCS); rotate the drawing and make sure the due north on the drawing coincides with the coordinate system’sy-axis and the coordinates of grids are consistent with the actual coordinates(2)
Select the contour lines with the same value on the map one by one to create a selection set, and select graphic elements in the selection set one by one using a cyclic execution command(3)
For each graphic element, obtain the sublists of items with specified key-value in the graphic element information list and find the corresponding coordinates and attribute values, and output the serial numbers, coordinates, and attribute values of graphic elements to the specified files; meanwhile, mark changes to the colors of selected graphic elements


## 3.2.2. Extraction of Data Reflecting the Spatial Locations of Geological Points and Coal Seam Thickness from Geological Cross-Sections

Geological cross-sections are plotted based on the results of exploratory drilling and the geological information collected during actual mining. Geological cross-sections reflect the real spatial relationships between geological bodies and mining activities and serve as the critical materials for geological engineers and technicians to establish the concept of mining space and analyze technical issues. The geological data contained in geological cross-sections is generally consistent with the data in 2D drawings. In geological cross-sections, the spatial data of geological objects for locations, near which mining activities are carried out, may be more accurate and is usually crosschecked with the data of geological points indicated in 2D drawings. The detailed procedure for extracting useful space and attribute data of geological body from geological cross-sections is described below:(1)
Open a geological cross-section and its corresponding plan in the same model space, set the plot scale to 1 : 1, and use the world coordinate system (WCS).(2)
Use the two horizontal endpoints in the cross-section as control points A’ and B’, and find the coordinates of their corresponding planar positions A and B (point A on the left and point B on the right): A(x1, y1, 0) and B(x2, y2, 0)(3)
Get angleang between the AB vector straight line and the positive direction of the x-axis in the coordinate system; rotate (counterclockwise) the cross-section ang degrees based on point A; move the cross-section with the base point in a parallel way. Rotate the cross-section to allow points A’ and B’ to move to the positions of points A and B in the 2D drawing so that the coordinates of points A and B in the WCS are consistent with the x-y planar coordinates of their actual spatial coordinates.(4)
Let any point of a coal seam floor shown in the cross-section beP, its coordinates in the WCS be (xt, yt), and its real spatial coordinates to be found be (x, y, z); call the subprogram to calculate the distance of vertical projection ds of point P onto the AB straight line.(5)
Select P points in batch, calculate their coordinates by interpolation according to formula (1), and output the calculated coordinates into the specified txt file:(1)x=x1+x1−xt2+y1−yt2−ds2x1−x22+y1+y22x2−x1,y=y1+x1−xt2+y1−yt2−ds2x1−x22+y1+y22y2−y1,z=−ds.


## 3.3. Extraction of Downhole Geological Survey and Drilling Results

### 3.3.1. Results of Geological Survey on Excavation Working Face

The foremost information on geological bodies can be obtained by performing geological surveys on excavation working faces. The results of such geological surveys are important references for analyzing local geological conditions and predicting the geological conditions in the forward direction and can directly affect the accuracy and timeliness of geological modeling. When no fault is encountered along the coal roadway, it is relatively simple to obtain the geological results and data for coal seam floors by calculation based on the basic parameters of geological survey. According to the requirements on geological survey for roadway excavation specified in theRegulations on Geological Work at Coal Mines (China) and considering the needs of accurate modeling, it is required to acquire geological data for coal seam points at a spacing of about 10 m, i.e., one coal seam point per 10 m. The real difficulty lies in the fact that it is not possible to directly acquire the accurate fault location and occurrence parameters data due to environmental reasons or safety risk when any fault is encountered along the coal roadway. It is necessary to analyze and calculate the fault location and occurrence parameters based on available field geological survey data. These faults are shown in Figure 2. Figure 2(a) shows a fault cutting through both sides of the roadway, and Figure 2(b) shows a fault cutting through one side of the roadway and the heading face.Figure 2
Diagram of calculation parameters for faults cutting the roadway. (a) A fault cutting through both sides of the roadway. (b) A fault cutting through one side of the roadway and the heading face.
(a)(b)Taking the first case shown in Figure2(a) as an example, for the excavated rectangular roadway cut by a fault, the azimuth is azi, the angle of slope is θ, the width is k, the coordinates of point P nearest to the heading face are (px, py, pz), the distances from the upper points of intersection between the fault plane and the left and right rides of the roadway to point P are d1 and d2, and the average value of pseudodip angles between the fault and roadway sides is α (the pseudodip angles between the fault and the left and right sides of the roadway are usually slightly different). Using these parameters, the coordinates (fx, fy, fz) of the fault location, which is calculated according to the intersection point of roof and fault plane on the central line of roadway, true dip direction fqx, and true dip angle fqj of the fault can be calculated according to(2)fx=px+cosθcosπ/2−azid1+d22,fy=py+cosθsinπ/2−azid1+d22,fz=pz+sinθd1+d22,fqx=azi−π−arctand2−d1k,fqj=arctantanαabscosfqx.The aforementioned calculations, data storage, and the drafting of 2D drawings of fault location and occurrence parameters under complex conditions are completed using the programs developed in this study. The main codes used in these programs are listed below.(defun c:faultcg()(setvar “cmdecho” 0)(setq osm (getvar “osmode”))(setvar “osmode” 0)(setqP (getpoint “please select the location of measure point on the screen:”))(command “circle”p 0.25)(command “text“p 1 0 “P”””)(setq px (getreal “please enter thex-coordinate of measure point P:”))(setq py (getreal “please enter they-coordinate of measure point P:”))(setq pz (getreal “please enter the elevation of measure pointP:”))(setq Azi (getreal “please enter the roadway azimuth ”))(setq azi (/(∗ azi pi) 180)); convert angle to radian measure(setq ll (getreal “please enter the distance from the point of intersection between the fault plane and the left side of the roadway to measure pointP:”))(setq lr (getreal “please enter the distance from the point of intersection between the fault plane and the right side of the roadway to measure pointP:”))(setq ly (getreal “please enter the distance from the heading face to measure pointP:”))(setqp1 (polar p (/(∗1 pi) 2) (/k 2)))(setqy1 (polar p1 0 ll))(setqy2 (polar y1 (/(∗3 pi) 2) 5))(setqp2 (polar p1 (/(∗3 pi) 2) 5))(command “pline“p1 y1 y2 p2””)(setqf1 (polar p1 0 ll))(setqf2 (polar p2 0 lr))(command “color” “red”)(command “pline“f1 f2””)(setq dip (getreal “please enter the slope of the roadway:”))(setqh (getreal “please enter the fault throw:”))(setq wqj (getreal “please enter the pseudodip angles between the fault and roadway sides:”))(setq wqj (/(∗wqj pi) 180))(setq ang (anglef2 f1))(setq For B (getstring “please confirm if the dip direction of the fault coincides with the direction of roadway excavation: <y or n>”))(setq ds (distancef1 f2))(setqf (polar f2 ang (∗0.5 ds)))(setqf3 (polar f ang 1))(setqf4 (polar f (- ang pi) 1))(if (eq ForB “y”)(Progn(setq f-qx (- ang (∗0.5 pi)))(setq zqj (atan (/(tan wqj) (cos f-qx))))(setq zqj (∗180 (/zqj pi)))(setq ff (polarf f-qx 2))(setqf5 (polar f3 f-qx 1))(setqf6 (polar f4 f-qx 1))(command “line“f ff””)(command “line“f3 f5””)(command “line“f4 f6””))(Progn(setqf-qx (+ang (∗0.5 pi)))(setq ff (polarf f-qx 2))(setqf5 (polar f3 f-qx 1))(setqf6 (polar f4 f-qx 1))(command “line“f ff””)(command “line“f3 f5””)(command “line“f4 f6””)))(setqf-qx (∗180 (/f-qx pi)))(princ “\n parameters of fault occurrence: ”)(princ (rtosf-qx))(princ “degrees”)(princ “<”)(princ (rtos zqj))(princ “degrees”)(setq tazi (- (∗0.5 pi) azi))(setq fdis (/(+ll lr) 2))(setq fdis (∗fdis (cos dip)))(setq fx (+px (∗fdis (cos tazi))))(setq fy (+py (∗fdis (sin tazi))))(setq fz (+pz (∗fdis (sin dip))))(princ “\n fault location:”)(princ “\n X = ”)(princ rtos fx)(princ “\n Y = ”)(princ rtos fy)(princ “\n Z = ”)(princ rtos fz)(setq file (open “D: \\dccg.txt” “a”))(write-line (strcat (rtos fx 2 4) “ ” (rtos fy 2 4) “ ” (rtos fz 2 4) “ ”(rtos f-qx 2 4) “ ”(rtos zqj 2 4)) file); please output the coordinates of the point of intersection between the fault plane and the roadway’s top center line, and the parameters of fault occurrence(close file)(command “color” “bylayer”)(setvar “osmode” osm)(princ))(defun tan(A); define tan() function(if (= (cosA) 0)(sinA)(/(sinA) (cos A)))).In Figure2(b), d2 is the distance from the intersection point of the fault plane and the top of the heading face to the roadway ride which is cut by the fault and β is the pseudodip angle of fault plane at the heading face. Other parameters are consistent with Figure 2(a). The idea of data calculation and programming is similar, so it will not be repeated here.


### 3.3.2. Results of Geological Survey on Mining Working Face

Abundant high-density 3D spatial data of coal seams and faults can be obtained by performing geological surveys on mining working faces. Such geological surveys provide massive basic data that is comprehensive and reliable for building high-resolution 3D geological models of working faces and lay solid foundations for the precise prediction of geological conditions in the forward direction and the accurate calculation of the amounts of coal recovered and lost at working faces. The results of geological surveys on mining working faces are usually concentrated in the two-dimensional plane drawings of the working face. The extraction of corresponding space and attribute data of geological objects is realized according to the following ideas:(1)
Set the plot scale of 2D working face drawings to 1 : 1, use the user coordinate system (UCS), and find the coordinates of point A (xa, ya) and point B (xb, yb) at two endpoints of the working face on the coal seam roof and the distance between points A and B and the corresponding coordinates za and zb on the coal seam roof, as well as coal thicknesses ha and hb.(2)
Select any coal seam pointPn or point of intersection Fn between the fault plane and the supported roof of the roadway (the coal seam point should be located in the coal seam floor, and the fault point shall be located in the roof of the supports) and find the straight distance ln from the selected point to point A and dip angle θ.(3)
Calculate coordinates (xn, yn, zn) of the surveyed coal seam point and fault point by linear interpolation according to formula (3) and output the calculated results together with the corresponding coal thickness hn and mining height cg to the specified files for storage:(3)xn=xa−lncosθxa−xbL,yn=ya−lncosθya−ybL,zn=za+lnsinθ.


### 3.3.3. Underground Drilling Results

To compensate for the lack of precision in surface geological explorations and improve the geological control of coal seams in the mining space, underground geological drilling is usually performed in advance before further mining activities are carried out. In addition, when the gas in surrounding coal seams needs to be drained using the roadways arranged in the strata of coal seam floors and roofs to eliminate the risk of outburst, a large number of boreholes penetrating the coal seams also need to be drilled. Using the calculated results of the locations and thicknesses of coal seams discovered by drilling, the characteristics of occurrence, structure, and distribution of these coal seams can be identified accurately, thus providing reliable supporting data for the optimal design and safe construction of mining heads and working faces. The underground geological drilling results and incline-measure data are usually recorded and stored in the form of Excel spreadsheet, and the record format is shown in Tables1 and 2.Table 1
Original data table of underground geological drilling results.
No.xyzDip (°)Azimuth (°)Depth of coal starting point (m)Depth of coal ending point (m)Final depth (m)Roadway name129797.08287828.686−447.8−2910141.547.653Roof roadway of 1321229797.08287828.686−447.3−59.41926.227.529.8Roof roadway of 1321Table 2
Original incline-measure data table of an underground geological borehole.
Measuring depth no.Distance between measuring pointsLi (m)Borehole vertex angleθi (°)Borehole azimuthalγi (°)000.000.00153.50115.30233.60116.40333.50114.60433.10115.30533.50116.70To determine the locations and thicknesses of coal starting points discovered by drilling, it is necessary to perform calculation and inversion of drilling operation parameters and lithological records. In traditional inversion methods, drilling parameters and lithological records are manually calculated using mathematical formulas or calculated using CAD drawings and then projected onto cross-sections and 2D drawings. These traditional methods are characterized by very complex calculations and low efficiency, especially when borehole incline-measure data is involved.For these reasons, a spatial mathematical model for borehole inversion is built based on the spatial relationships among borehole drilling parameters, results, and data, and the quick computation of target coal seams is achieved using AutoLISP. The proposed solution is more efficient that the traditional inversion methods. The programming idea and algorithms for the proposed solution are introduced below:(1)
Call the ActiveX object function to open the excel spreadsheet recording drilling results, convert each row of data in the excel spreadsheet to series, and find borehole numberzkbh, design azimuth α; design dip angle β borehole coordinates (x, y, z), depth of coal starting point lj, and depth of coal ending point lz.(2)
Calculate the coordinates of coal starting point (xj0, yj0, zj0) and coal ending point (xz0, yz0, zz0) in the borehole without inclination measurement data using formulas (4) and (5):(4)xj0=x+ljcosαsinβ,yj0=y+ljsinαsinβ,zj0=z±ljsinβ,(5)xz0=x+lzcosαsinβ,yz0=y+lzsinαsinβ,zz0=z±lzsinβ.It should be noted that when the drilling direction is from the bottom to top, the right part of calculation formulas ofzj0 and zz0 takes “−” and, when the drilling construction direction is from top to bottom, it takes “+” sign.(3)
Load the excel spreadsheet containing inclination measurement results and data, find lengthsl1, l2, …ln of n borehole sections in which the inclination is measured, measured dip angles θ1, θ2, …, θn, and measured azimuths γ1, γ2, …, γn.(4)
Determine the relationship between the depth of coal starting pointlj, depth of core ending point lz, and cumulative depth ∑i=1kli of borehole sections in which the inclination is measured. In ∑i=1kli, k is an integer, and 1 ≤ k < n.(5)
Calculate the values of inclination Δxj, Δyj, Δzj and Δxz, Δyz, Δzz at the corresponding coal starting and ending points using iteration formulas (6) and (7):(6)Δxj=Δxk+lj−∑i=1klicosθk+1cosγk+1,Δyj=Δyk+lj−∑i=1klicosθk+1sinγk+1,Δzj=Δzk+lj−∑i=1klisinθk+1,(7)Δxz=Δxk+lz−∑i=1klicosθk+1cosγk+1,Δyz=Δyk+lz−∑i=1klicosθk+1sinγk+1,Δzz=Δzk+lz−∑i=1klisinθk+1.(6)
Use the calculated values of borehole inclination to correct the three components of the coordinates of coal starting and ending points calculated without inclination measurement data in step (2) according to formulas (8) and (9), find the coordinates of actual coal starting point (xj, yj, zj), the coordinates of actual coal ending point (xz, yz, zz), and coal seam vertical thickness (zz−zj)sinθn (which is approximately equal to coal seam thickness when the coal seam is slightly inclined), and input these data to the specified file:(8)xj=xj0+Δxj,yj=yj0+Δyj,zj=zj0+Δzj,(9)xz=xz0+Δxz,yz=yz0+Δyz,zz=zz0+Δzz.


## 3.3.1. Results of Geological Survey on Excavation Working Face

The foremost information on geological bodies can be obtained by performing geological surveys on excavation working faces. The results of such geological surveys are important references for analyzing local geological conditions and predicting the geological conditions in the forward direction and can directly affect the accuracy and timeliness of geological modeling. When no fault is encountered along the coal roadway, it is relatively simple to obtain the geological results and data for coal seam floors by calculation based on the basic parameters of geological survey. According to the requirements on geological survey for roadway excavation specified in theRegulations on Geological Work at Coal Mines (China) and considering the needs of accurate modeling, it is required to acquire geological data for coal seam points at a spacing of about 10 m, i.e., one coal seam point per 10 m. The real difficulty lies in the fact that it is not possible to directly acquire the accurate fault location and occurrence parameters data due to environmental reasons or safety risk when any fault is encountered along the coal roadway. It is necessary to analyze and calculate the fault location and occurrence parameters based on available field geological survey data. These faults are shown in Figure 2. Figure 2(a) shows a fault cutting through both sides of the roadway, and Figure 2(b) shows a fault cutting through one side of the roadway and the heading face.Figure 2
Diagram of calculation parameters for faults cutting the roadway. (a) A fault cutting through both sides of the roadway. (b) A fault cutting through one side of the roadway and the heading face.
(a)(b)Taking the first case shown in Figure2(a) as an example, for the excavated rectangular roadway cut by a fault, the azimuth is azi, the angle of slope is θ, the width is k, the coordinates of point P nearest to the heading face are (px, py, pz), the distances from the upper points of intersection between the fault plane and the left and right rides of the roadway to point P are d1 and d2, and the average value of pseudodip angles between the fault and roadway sides is α (the pseudodip angles between the fault and the left and right sides of the roadway are usually slightly different). Using these parameters, the coordinates (fx, fy, fz) of the fault location, which is calculated according to the intersection point of roof and fault plane on the central line of roadway, true dip direction fqx, and true dip angle fqj of the fault can be calculated according to(2)fx=px+cosθcosπ/2−azid1+d22,fy=py+cosθsinπ/2−azid1+d22,fz=pz+sinθd1+d22,fqx=azi−π−arctand2−d1k,fqj=arctantanαabscosfqx.The aforementioned calculations, data storage, and the drafting of 2D drawings of fault location and occurrence parameters under complex conditions are completed using the programs developed in this study. The main codes used in these programs are listed below.(defun c:faultcg()(setvar “cmdecho” 0)(setq osm (getvar “osmode”))(setvar “osmode” 0)(setqP (getpoint “please select the location of measure point on the screen:”))(command “circle”p 0.25)(command “text“p 1 0 “P”””)(setq px (getreal “please enter thex-coordinate of measure point P:”))(setq py (getreal “please enter they-coordinate of measure point P:”))(setq pz (getreal “please enter the elevation of measure pointP:”))(setq Azi (getreal “please enter the roadway azimuth ”))(setq azi (/(∗ azi pi) 180)); convert angle to radian measure(setq ll (getreal “please enter the distance from the point of intersection between the fault plane and the left side of the roadway to measure pointP:”))(setq lr (getreal “please enter the distance from the point of intersection between the fault plane and the right side of the roadway to measure pointP:”))(setq ly (getreal “please enter the distance from the heading face to measure pointP:”))(setqp1 (polar p (/(∗1 pi) 2) (/k 2)))(setqy1 (polar p1 0 ll))(setqy2 (polar y1 (/(∗3 pi) 2) 5))(setqp2 (polar p1 (/(∗3 pi) 2) 5))(command “pline“p1 y1 y2 p2””)(setqf1 (polar p1 0 ll))(setqf2 (polar p2 0 lr))(command “color” “red”)(command “pline“f1 f2””)(setq dip (getreal “please enter the slope of the roadway:”))(setqh (getreal “please enter the fault throw:”))(setq wqj (getreal “please enter the pseudodip angles between the fault and roadway sides:”))(setq wqj (/(∗wqj pi) 180))(setq ang (anglef2 f1))(setq For B (getstring “please confirm if the dip direction of the fault coincides with the direction of roadway excavation: <y or n>”))(setq ds (distancef1 f2))(setqf (polar f2 ang (∗0.5 ds)))(setqf3 (polar f ang 1))(setqf4 (polar f (- ang pi) 1))(if (eq ForB “y”)(Progn(setq f-qx (- ang (∗0.5 pi)))(setq zqj (atan (/(tan wqj) (cos f-qx))))(setq zqj (∗180 (/zqj pi)))(setq ff (polarf f-qx 2))(setqf5 (polar f3 f-qx 1))(setqf6 (polar f4 f-qx 1))(command “line“f ff””)(command “line“f3 f5””)(command “line“f4 f6””))(Progn(setqf-qx (+ang (∗0.5 pi)))(setq ff (polarf f-qx 2))(setqf5 (polar f3 f-qx 1))(setqf6 (polar f4 f-qx 1))(command “line“f ff””)(command “line“f3 f5””)(command “line“f4 f6””)))(setqf-qx (∗180 (/f-qx pi)))(princ “\n parameters of fault occurrence: ”)(princ (rtosf-qx))(princ “degrees”)(princ “<”)(princ (rtos zqj))(princ “degrees”)(setq tazi (- (∗0.5 pi) azi))(setq fdis (/(+ll lr) 2))(setq fdis (∗fdis (cos dip)))(setq fx (+px (∗fdis (cos tazi))))(setq fy (+py (∗fdis (sin tazi))))(setq fz (+pz (∗fdis (sin dip))))(princ “\n fault location:”)(princ “\n X = ”)(princ rtos fx)(princ “\n Y = ”)(princ rtos fy)(princ “\n Z = ”)(princ rtos fz)(setq file (open “D: \\dccg.txt” “a”))(write-line (strcat (rtos fx 2 4) “ ” (rtos fy 2 4) “ ” (rtos fz 2 4) “ ”(rtos f-qx 2 4) “ ”(rtos zqj 2 4)) file); please output the coordinates of the point of intersection between the fault plane and the roadway’s top center line, and the parameters of fault occurrence(close file)(command “color” “bylayer”)(setvar “osmode” osm)(princ))(defun tan(A); define tan() function(if (= (cosA) 0)(sinA)(/(sinA) (cos A)))).In Figure2(b), d2 is the distance from the intersection point of the fault plane and the top of the heading face to the roadway ride which is cut by the fault and β is the pseudodip angle of fault plane at the heading face. Other parameters are consistent with Figure 2(a). The idea of data calculation and programming is similar, so it will not be repeated here.


## 3.3.2. Results of Geological Survey on Mining Working Face

Abundant high-density 3D spatial data of coal seams and faults can be obtained by performing geological surveys on mining working faces. Such geological surveys provide massive basic data that is comprehensive and reliable for building high-resolution 3D geological models of working faces and lay solid foundations for the precise prediction of geological conditions in the forward direction and the accurate calculation of the amounts of coal recovered and lost at working faces. The results of geological surveys on mining working faces are usually concentrated in the two-dimensional plane drawings of the working face. The extraction of corresponding space and attribute data of geological objects is realized according to the following ideas:(1)
Set the plot scale of 2D working face drawings to 1 : 1, use the user coordinate system (UCS), and find the coordinates of point A (xa, ya) and point B (xb, yb) at two endpoints of the working face on the coal seam roof and the distance between points A and B and the corresponding coordinates za and zb on the coal seam roof, as well as coal thicknesses ha and hb.(2)
Select any coal seam pointPn or point of intersection Fn between the fault plane and the supported roof of the roadway (the coal seam point should be located in the coal seam floor, and the fault point shall be located in the roof of the supports) and find the straight distance ln from the selected point to point A and dip angle θ.(3)
Calculate coordinates (xn, yn, zn) of the surveyed coal seam point and fault point by linear interpolation according to formula (3) and output the calculated results together with the corresponding coal thickness hn and mining height cg to the specified files for storage:(3)xn=xa−lncosθxa−xbL,yn=ya−lncosθya−ybL,zn=za+lnsinθ.


## 3.3.3. Underground Drilling Results

To compensate for the lack of precision in surface geological explorations and improve the geological control of coal seams in the mining space, underground geological drilling is usually performed in advance before further mining activities are carried out. In addition, when the gas in surrounding coal seams needs to be drained using the roadways arranged in the strata of coal seam floors and roofs to eliminate the risk of outburst, a large number of boreholes penetrating the coal seams also need to be drilled. Using the calculated results of the locations and thicknesses of coal seams discovered by drilling, the characteristics of occurrence, structure, and distribution of these coal seams can be identified accurately, thus providing reliable supporting data for the optimal design and safe construction of mining heads and working faces. The underground geological drilling results and incline-measure data are usually recorded and stored in the form of Excel spreadsheet, and the record format is shown in Tables1 and 2.Table 1
Original data table of underground geological drilling results.
No.xyzDip (°)Azimuth (°)Depth of coal starting point (m)Depth of coal ending point (m)Final depth (m)Roadway name129797.08287828.686−447.8−2910141.547.653Roof roadway of 1321229797.08287828.686−447.3−59.41926.227.529.8Roof roadway of 1321Table 2
Original incline-measure data table of an underground geological borehole.
Measuring depth no.Distance between measuring pointsLi (m)Borehole vertex angleθi (°)Borehole azimuthalγi (°)000.000.00153.50115.30233.60116.40333.50114.60433.10115.30533.50116.70To determine the locations and thicknesses of coal starting points discovered by drilling, it is necessary to perform calculation and inversion of drilling operation parameters and lithological records. In traditional inversion methods, drilling parameters and lithological records are manually calculated using mathematical formulas or calculated using CAD drawings and then projected onto cross-sections and 2D drawings. These traditional methods are characterized by very complex calculations and low efficiency, especially when borehole incline-measure data is involved.For these reasons, a spatial mathematical model for borehole inversion is built based on the spatial relationships among borehole drilling parameters, results, and data, and the quick computation of target coal seams is achieved using AutoLISP. The proposed solution is more efficient that the traditional inversion methods. The programming idea and algorithms for the proposed solution are introduced below:(1)
Call the ActiveX object function to open the excel spreadsheet recording drilling results, convert each row of data in the excel spreadsheet to series, and find borehole numberzkbh, design azimuth α; design dip angle β borehole coordinates (x, y, z), depth of coal starting point lj, and depth of coal ending point lz.(2)
Calculate the coordinates of coal starting point (xj0, yj0, zj0) and coal ending point (xz0, yz0, zz0) in the borehole without inclination measurement data using formulas (4) and (5):(4)xj0=x+ljcosαsinβ,yj0=y+ljsinαsinβ,zj0=z±ljsinβ,(5)xz0=x+lzcosαsinβ,yz0=y+lzsinαsinβ,zz0=z±lzsinβ.It should be noted that when the drilling direction is from the bottom to top, the right part of calculation formulas ofzj0 and zz0 takes “−” and, when the drilling construction direction is from top to bottom, it takes “+” sign.(3)
Load the excel spreadsheet containing inclination measurement results and data, find lengthsl1, l2, …ln of n borehole sections in which the inclination is measured, measured dip angles θ1, θ2, …, θn, and measured azimuths γ1, γ2, …, γn.(4)
Determine the relationship between the depth of coal starting pointlj, depth of core ending point lz, and cumulative depth ∑i=1kli of borehole sections in which the inclination is measured. In ∑i=1kli, k is an integer, and 1 ≤ k < n.(5)
Calculate the values of inclination Δxj, Δyj, Δzj and Δxz, Δyz, Δzz at the corresponding coal starting and ending points using iteration formulas (6) and (7):(6)Δxj=Δxk+lj−∑i=1klicosθk+1cosγk+1,Δyj=Δyk+lj−∑i=1klicosθk+1sinγk+1,Δzj=Δzk+lj−∑i=1klisinθk+1,(7)Δxz=Δxk+lz−∑i=1klicosθk+1cosγk+1,Δyz=Δyk+lz−∑i=1klicosθk+1sinγk+1,Δzz=Δzk+lz−∑i=1klisinθk+1.(6)
Use the calculated values of borehole inclination to correct the three components of the coordinates of coal starting and ending points calculated without inclination measurement data in step (2) according to formulas (8) and (9), find the coordinates of actual coal starting point (xj, yj, zj), the coordinates of actual coal ending point (xz, yz, zz), and coal seam vertical thickness (zz−zj)sinθn (which is approximately equal to coal seam thickness when the coal seam is slightly inclined), and input these data to the specified file:(8)xj=xj0+Δxj,yj=yj0+Δyj,zj=zj0+Δzj,(9)xz=xz0+Δxz,yz=yz0+Δyz,zz=zz0+Δzz.


## 4. Application Cases

The northeastern panel of a mine in Huainan mining area covers an area of around 1.8 km2. The extent of geological exploration in this panel meets the requirements of the coalfield geological exploration norm of China. In this panel, three exploration lines have been arranged, 14 geological exploration boreholes have been drilled, and 20 boreholes have been drilled for gas drainage from working faces. The conventional 3D seismic survey covers the entire panel and provides the data concerning the overall occurrence of coal seams and the development of medium and large faults in the panel. Within the panel, three mining working faces have been arranged, and the total quantity of work for coal and rock roadways is 13,000 m approximately. In terms of geological conditions in this panel, the coal seams are gently sloped, but small and medium faults are well developed.Ordinary 3D geological models based on the existing results and data of exploratory drilling and gas drilling can only macroscopically characterize the general occurrence conditions of the coal seam and the distribution characteristics of structures, but cannot meet the demands of safe production and management. In order to build a high-resolution 3D geological model for coal mines in the study area, the latest revisions of the contour maps of coal seam floors (at a scale of 1 : 2000) and the geological cross-sections for exploration lines X, XI, and XII (at a scale of 1 : 2000) updated at the end of June 2019 are used as the basic materials for extraction of the spatial and attribute data of mining geology. Meanwhile, some results of downhole drilling and geological surveys on coal seam excavation and working faces obtained in the period from July to December 2019 are reviewed and collated, and the key data of geological points is calculated and output.What needs to be explained here is that the hardware test environment used in this data acquisition and experimental test is as follows: the CPU is Intel Core i7-8550u eight core processor, 8 GB memory, 128 GB + 1T hard disk, and the software test environment is Windows10, 64 bit operating system, and MongoDB 2.7.6.Massive reliable spatial data of point objects in mining geology stored in general text formats for a large number of geological points including 5816 coal seam points and 724 fault points, as listed in Table3, is obtained using a series of data extraction programs designed by us. The geological data obtained by the proposed solution has higher density and is more accurate than that used in conventional geological modeling methods. It lays a solid data foundation for high-resolution geological modeling of coal mines.Table 3
Extraction of basic geological data in the northeastern panel of a coal mine in Huainan mining area.
No.Data typeData sourceQuantity (pcs)1Coal seam pointCoal seam floor contour map13562Coal seam pointGeological cross-section for exploration line2623Coal seam pointGeological survey on excavation working face7084Coal seam pointGeological survey on mining working face32265Coal seam pointUnderground drilling results2646Fault pointCoal seam floor contour map4727Fault pointGeological cross-section for exploration line258Fault pointGeological survey on excavation working face539Fault pointGeological survey on mining working face174During data processing, the programmed data extraction method proposed in this paper is compared with several traditional methods that are based on manual calculation and ordinary graphics-based calculation from the perspective of time efficiency in data computation and storage. The proposed method completes the extraction of 100 pieces of geological point data from the contour maps of coal seam floors and the storage of extracted data in about 120 s, while it takes about 500 s for the traditional data calculation and collation methods to complete the extraction and storage of the same amount of data. The efficiency of the proposed method in calculating and extracting underground drilling results is improved significantly due to the automatic processing of borehole inclination measurement data, and the data processing time is reduced greatly from 1800 s to about 60 s. The comparison of other methods is shown in Figure3. The data in Figure 3 shows that the time efficiency of the proposed method in computing, extracting, and storing the basic geological data of coal mines is more than 60% higher than that of traditional methods.Figure 3
Comparison of the time efficiency of different geological data extraction methods.It is to be noted that the standardization of 2D geological drawings of coal mines is a basic job to be done well before data extraction. The quality and efficiency of data extraction are directly affected by whether the layer management is standard, whether the drawing rules are unified, and whether the attribute settings of graphic objects are complete. The level of digitalization of downhole geological exploration and drilling results is also an important factor affecting the efficiency of data extraction methods.Additionally, nonrelational MongoDB databases used in this research are compared with traditional relational SQLServer databases based on measured results in order to evaluate their performance and efficiency in storing spatial geological data with a varying order of magnitude. The results of comparison show that when the order of magnitude of the data written into data files for storage increases, especially when the number of data files exceeds 10 × 103, MongoDB databases become much better than other database systems in terms of data storage performance. Therefore, MongoDB databases are more suitable for storing massive spatial geological data. The details of comparison are shown in Figure 4.Figure 4
Comparison of the data storage performance of two different database systems.


## 5. Conclusion

The relevant research on the acquisition method of basic geological data in coal mines has not been taken seriously, which restricts the comprehensive, accurate, and efficient data acquisition, and is not conducive to the deep application of later data. Therefore, considering the current mode of geological work at coal mines, especially those located in mining areas where the informatization level is relatively low, a process for building the basic geological database for mine modeling using existing geological results and data is proposed and practiced. Through empirical study, the following were found:(1)
The spatial data of geological points stored in general text formats is extracted from the dynamic and static geological data pervasively existing at coal mines using a programming language for the secondary development of AutoCAD, text processing programs, and other proper methods. After transformation, the extracted data is stored and managed in MongoDB databases to allow for convenient data query, analysis, and correction. Finally, based on the extracted massive effective spatial data of mining geological objects, the building of high-resolution 3D geological models for coal mines may succeed in the near future.(2)
A series of data extraction programs are developed using AutoLISP, a programming language for the secondary development of AutoCAD to extract basic geological data from a variety of conventional technical materials including the contour maps of coal seam floors, geological cross-sections, and underground drilling results and the results of geological surveys on working faces, which can avoid the prominent problems in data acquisition such as artificial gross error, distortion of graph conversion, and different database structure, and make the obtained spatial geological data more comprehensive, accurate, and effective. The programmed data extraction method proposed in this paper can improve the efficiency of data extraction by more than 60%, indicating that this method is superior to the traditional methods based on manual calculation and ordinary graphics-based calculation.(3)
The level of standardization of 2D drawings and the level of digitalization of basic geological exploration results vary at different mines. The standardization of 2D mine drawings is a basic job to be completed satisfactorily before data extraction is performed because it directly affects the quality and efficiency of data extraction, and it is also an important factor affecting the quality and efficiency of data extraction, which needs to be strengthened.(4)
In this paper, a programmed data extraction method is presented, which only represents a small step towards the program-based extraction of basic geological data for mine modeling. Frankly speaking, the research perspective is not comprehensive enough and the means are not rich enough. The integrated platform for data extraction, storage, and management needs to be further developed and improved. The quality control, in-depth mining, and use of geological modeling data are important directions for subsequent research, which are worthy of in-depth investigation.



---

*Source: 6624142-2021-01-18.xml*