# Research and Application of 3D Visualization Plug-in Integration with ArcGIS

Yinglun Li, Guifen Chen, Dongxue Wang

► To cite this version:

Yinglun Li, Guifen Chen, Dongxue Wang. Research and Application of 3D Visualization Plug-in Integration with ArcGIS. 11th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Aug 2017, Jilin, China. pp.21-30, 10.1007/978-3-030-06179-1_3. hal-02111517

HAL Id: hal-02111517

https://inria.hal.science/hal-02111517

Submitted on 26 Apr 2019

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Research and Application of 3D Visualization Plug-in

Integration with ArcGIS

Yinglun Li, Guifen Chen (✉), and Dongxue Wang

Jilin Agricultural University, Changchun 130118, China
617990443@qq.com, guifchen@163.com

**Abstract.** With the development of agricultural production data, more and more three-dimensional visualization of monitoring data has become the focus of agricultural information technology research. The application of ArcGIS visualization technology, 3D visualization of auxiliary plug-in, and the national Spark Program demonstration area of farmland monitoring data obtained in Jilin province Nong'an County Helong town of application. In this study, the use of C++ language, the introduction of three-dimensional visualization library SDK, compiled auxiliary plug-in ArcGIS software, optimize the joint jiulongzhen farmland monitoring data 3D visualization. The experimental results show that the preparation of the postprocessing plug-ins integrated into ArcGis software can optimize the 3D visualization of monitoring data, the two-dimensional spatial variability of thematic map than the traditional representation of 3D data more natural, more clear, more intuitive, is of great significance for promoting the development of modern agriculture.

**Keywords:** ArcGIS, 3D visualization, auxiliary plug ins, farmland monitoring

# 1 Introduction

3D GIS is one of the new trends in the field of GIS. The 3D GIS is more realistic and visual than the two-dimensional GIS in expressing the objective world. It does not need the space entity for abstract symbols, but the geographical objects using stereo technology show to the user, and to provide humane and 3D simulation world interactive tools for users, users easier access to spatial information [1].

With the help of data visualization is the main graphical means to communicate clearly and effectively communicate with the information in order to effectively convey the concept, aesthetic form and function need to go hand in hand, by visually convey and key characteristics, in order to achieve in-depth insight into the rather sparse and complicated data set. Data visualization is closely related to information graphics, information visualization, scientific visualization and statistical graphics [2]. At present, data
visualization is a very active and critical aspect in the field of research, teaching and development. The term "data visualization" enables the integration of mature scientific visualization with the field of younger information visualization.

In order to continue to promote the optimization of the agricultural economy, and realize the sustainable development of the industry and the optimization of regional industrial structure, to further promote the wisdom of agricultural development, need comprehensive and timely grasp the dynamic development of agriculture, which requires the analysis of processing technology on the basis of the agricultural data and related data, characteristics of agricultural data meet the five characteristics of big data, a large amount of data, the two is fast processing speed, three types of data, the four is of high value, high accuracy is five [3]. The 3D visualization technology can use characteristics of agricultural data, continuous inspection data, identify the authenticity of data, more intuitive to find and put forward useful anomalies, analysis, understanding and duplicate data provides a useful tool for multidisciplinary collaboration to the bridge role.

# 2 visual data types and preprocessing

## 2.1 visual data type

According to the attributes of the data source, types, dimensions, representations and other features, the visual data can be divided into one-dimensional data, two-dimensional data, multi-dimensional data, text and hypertext, graphics, image data, etc. And to visualize data, we first have to extract feature information from the data:

1. visual data is discrete data. In order to improve accuracy, difference method is needed.

2. visual data can be regular or irregular. Regular data can save storage space, and irregular data can give us greater freedom of expression.

3., the visual data must have an extension dimension, that is, the 5 data types mentioned earlier.

After identifying the issues related to data attributes, you need to prepare for dealing with large amounts of data. Data is produced at a much faster rate than it is managed and analyzed. The cardinality of the columns that need to be visualized is also a factor that should be taken into account. The high cardinality means that the column has a large number of different values, while the lower cardinality indicates that the column has a large number of duplicate values, such as [4].

## 2.2 data preprocessing

The visual module inputs analog data and experimental / measurement data from the computer, and includes data calls in the database. The objects of visual processing include symbols, structures, images, and signals". The generation and acquisition of primitive symbols, structures, images and signals are the tasks of scientists or engineers engaged in scientific and engineering calculations and experiments. How to transform these data into visual graphics (images) is the task of scientists and engineers engaged in scientific computing visualization applications. They combine with scientists engaged in basic research or engineering research, and use visual tools to implement and complete the process of converting invisible objects into visible images. Usually, the processing of these raw data should include the following two aspects:

Raw data preprocessing and storage are usually used to visualize raw data, and the preprocessing
section involves the following operations:

1) data format and standardization;

2) data transformation technology;

3) data compression and decompression.

The data processed through the above may have larger data capacity. It is usually stored in a standardized data interchange format. The NASA and other units of the National Supercomputing Center study the format and structure of scientific data storage and exchange, such as HDF, CDF, and NetCDF. These data formats are typically self describing, easy to store and read, and are widely used in large-scale numerical computations. Through the sensor Nong'an County Joint jiulongzhen soil moisture real-time data as shown in figure 1.

<figure><img src="image_2.png" /><figcaption>Figure 1 moisture Nong'an County Helong town farmland real time data</figcaption></figure>

## 3 Construction of plots model

At present, there are two main ways to construct geological models: irregular triangular mesh (TIN) and regular grid method (Grid).

TIN is a continuous blanket of topographic surfaces consisting of many adjacent but not overlapping triangles. Different types of TIN have different generation methods. According to the geometric structure of the spatial distribution, there can be a general triangulation and Delaunay triangulation.

In contrast to TIN, Grid is a composite surface composed of several consecutive squares of the same shape in space. The data structure of Grid is very regular and simple. It is possible to construct continuous, smooth and smooth surfaces through these data, and the structure of the mathematical model is simple. Thus, Grid has the advantage of constructing a visual representation of good ground models [5].

Many scholars at home and abroad have made extensive research in the geological level generation methods, some scholars have used Grid triangulation into triangular data to generate geological level [6].
The triangulation is the simplest for Grid, which splits into the triangular mesh structure and gets the raw data in a regular and systematic way. From the rules of the generation of TIN is mainly in the grid decomposition can be combined in the triangle, regular grid case, with one or two days to form diagonal grid decomposition of a series of rules of the triangle. After data processing, the interpolation of geological space is carried out, and the purpose is to grid the data [7]. Based on the grid data obtained, geological layers are plotted by using VC++ and OpenGL.

The main idea of the establishment of this method based on TIN multilayer geological body is, according to the geological layers with the elevation information to establish the TIN into a boundary between two layers of TIN, using the boundary and TIN were built erected under two TIN layer, the vertical TIN to simulate the geological body solid part.

(1) data arrangement;

The main tasks of data collation are drilling data extraction and data slicing. The borehole coordinate results table.Xls table data and coal quality testing results table.Xls table finishing, let it become a format for the "number, X, Y, Z" for the superposition of the formation of documents. Converts to text files for subsequent program processing.

(2) data format conversion

Using the development program of AutoCAD2000 software, we can draw the above hierarchical data files, eliminate the error points and save the.Dwg format.

(3) loading elevation point data;

Open Arcsence and add the "point" layer of the saved.Dwg data to the layer. Since the elevation of each stratum is different, the multilayer data is stacked up and down after loading the multi layer data Point layer.

(4) establishing TIN;

Using create, Analyst, create/modify, TIN, TIN, from, and features under 3D, choose to load the point layer to build the TIN and build the TIN (Elevation) to build the TIN. As shown in figure 2.

<figure><img src="image_3.png" /><figcaption>Figure 2 the establishment of Nong'an County Helong town experimental field plots TIN model</figcaption></figure>
(5) draw the boundaries of TIN

In AutoCAD2000, a closed boundary (i.e., a range of Tin) is plotted along the boundary of the geological point so that the upper and lower points are coupled into a geological body. After many experiments, it is proved that the geological boundary can be achieved by drawing the inner boundary near the boundary of the geological point. It is worth noting that, when drawing the inner boundary, the connection of the polygon side can reduce the unnecessary connection on the side of the geological body. The inner boundary is chosen, and its elevation is assigned in its characteristics. This value should be in the middle of the elevation of the upper and lower two points. As shown in figure 3.

<figure><img src="image_4.png" /><figcaption>Figure 3 markers in Nong'an County Helong town experimental field plots TIN boundary</figcaption></figure>

(6) build DEM stretch layer

When you open the ArcScene and load the inner boundary, you can see that it is at the height of the two layer point, adjusted properly until the inner edge of the interface is in the middle of the two layer. Again, open the create TIN from Elevation create/modify Analyst under 3D TIN features, load the geological points and the inner edge interface, select a layer, set the Height source to the other attribute in the default format. Then select its corresponding inner edge interface, set its Triangulate attribute to hard erase, and the other two items to None. Select the saved path and click OK to build an upright TIN. Thus, the TIN formed by the geological point is the surface, and the geological body with the thickness of the TIN as the lateral body is formed.

In support of the national Spark Program, the experiment and research in the field of monitoring data obtained in Nongan County, Jilin Province town of helong. The total area of the experimental plot is about 375 mu, and the grid size is set up[8]. There are several sampling points in the plot. We chose the moisture data for comprehensive analysis. After finishing, we drew a simple 3D block rendering by drawing the plots and the marked TIN points in ArcScene. As shown in figure 4.
<figure><img src="image_5.png" /><figcaption>Figure 4 Visual expression of soil moisture in farmland of Nong'an County Helong town</figcaption></figure>

## 4 development of 3D visualization plug-in based on ArcGIS

ArcGIS 3D visualization plug-in development, we need to apply to the ArcGIS SDK software, and in the Visual Studio platform to write source code. Visual Studio is the most popular integrated development environment for Windows platform applications. Visual Studio as an integrated solution, applicable to both individual and all sizes of development teams, seamless collaboration, improved production efficiency and concentration.

All of the ArcGIS plug-in source code has a single entry point, main(), which is repeated with the action indicated by the selector. For the main() prototype, this is the case:

```c
PF_Err main (PF_cmd cmd,
    PF_InData *in_data,
    PF_OutData *out_data,
    PFParamList params,
    PF_LayerDef *output,
    void *extra);
```

The first parameter is a selector whose value indicates the execution phase the plug-in is about to enter.

The second parameter is a callback function that points to the large data structure that contains the host application status information and hooks, which is a primary parameter.

The third parameter is a pointer to a structure that communicates its needs to the host as a plug-in. For example, error messages can be sent to the host via mail.

The structure of pfLayerDef output parameter point, which contains the output image information (including a pointer to the data): its size, its rowbytes value, and extent_hint, which is directly to the border area, really need to render[9].

Finally, the extra pointer is a special use parameter that is largely unused to the program. It points to different data structures at different times. If you decide to implement a custom user interface element, or a complex custom data type, you will only process this parameter[10].

### 4.1 ArcGIS camera plug-in function

In the general case (without opening the 3 dimension layer attributes) camera has no effect, open the
layer 3D attribute or some 3D effects can play a role, it can be simulated in 3D scene picture (picture Z attribute axis), allowing multiple layers to produce perspective, and also to support the light and material, projection / shadow. In software, the camera is virtual and will not have a track or a three stand for you to use. However, by simulating real-life camera movements, we can migrate our understanding to virtual cameras, so that we can better understand and apply it. In practice, we will find that the simple on camera animation, it is very difficult to achieve the desired effect, not our understanding is not enough, but the software itself is designed so that we need to find some way to simulate the camera in real life, to achieve our purpose.

## 4.2 ArcGIS camera plug-in preparation

First, define the camera interface;

```c
#define kAEGPCameraSuite "AEGP Camera Suite"
#define kAEGPCameraSuiteVersion2 2 /* frozen in AE 5.5 */
```

```c
typedef struct AEGPerasSuite2 {
    SPAPI A_Err (*AEGP_GetCamera) (
        PR_RenderContextH         render_contextH,   /* >> */
        const A_Time              *comp_timeP,      /* >> */
        AEGP_LayerH               *camera_layersPH); /* << */
```

Then define the camera type;

```c
SPAPI A_Err (*AEGP_GetCameraType) (
    AEGP_LayerH             camera_layersH,   /* >> */
    AEGPerasType           *camera_typeP);   /* << */
```

Define camera view;

```c
SPAPI A_Err (*AEGP_GetDefaultCameraDistanceToImagePlane) (
    AEGP_CompH              compH,            /* >> */
    A_FpLong               *dist_toPlanePF);  /* << */
```

// If a camera is created using aegp, then you must set the
film size units.

// No default is provided.

Define camera size and size;

```c
SPAPI A_Err (*AEGP_GetCameraFilmSize) (
    AEGP_LayerH             camera_layersH,   /* >> */
    AEGP_FilmSizeUnits      *film_size_unitsP,  /* << */
    A_FpLong               *film_sizePF0);    /* << in pixels */

SPAPI A_Err (*AEGP_SetCameraFilmSize) (
    AEGP_LayerH             camera_layersH,   /* >> */
    AEGP_FilmSizeUnits      film_size_units,   /* >> */
    A_FpLong               *film_sizePF0);    /* >> in pixels */
```
```c
} AEGPerasaSuite2;
```

At this point, our plug-in program is complete, the plug-in code generation plug-in format files, import into the ArcGis software database, open the software can be invoked. Figure 5 is the effect of observing the block data in the software after calling the camera plug-in.

<figure><img src="image_6.png" /><figcaption>Figure 5 Integrated camera plug-in after the soil moisture data observation effect diagram</figcaption></figure>

## 5 Conclusion

With the help of data visualization is the main graphical means to communicate clearly and effectively communicate with the information in order to effectively convey the concept, through the convey and key characteristics, in order to achieve in-depth insight into the rather sparse and complex data sets. Research and experimental results show that

(1) based on the ArcGis software SDK source code to write the auxiliary plug-in and ArcGis software integration, to make up for the ArcGis software auxiliary function is not perfect, and optimize the visualization effect of agricultural monitoring data is feasible.

(2) integrated plug-in ArcGis software in the field monitoring data, obvious optimization effect of 3D visualization of monitoring data, the two-dimensional spatial variability of thematic map than the traditional representation of 3D data more natural, more clear, more intuitive. The results of the study are of great significance to the development of modern agriculture.

## Acknowledgments

This work was funded by the China Spark Program. 2015GA660004. "Integration and demonstration of corn precise operation technology based on Internet of things"
Reference

1. Xiaodan Mei. GIS,J.:Urban Planning in theInformation Age. Heilongjiang transportation science and technology (2007)

2. Hengan Xue, Ming Shang, J.: Rational analysis of GIS in urban planning and design. urban surveying (2004)

3. Xu Wenhui, Zhao Weiya, et al, J.: Application of RS and GIS in the planning of agricultural green space system. people Yangtze river(2008)

4. Xie Bo, Li Lijun, et al, J.: Research on 3D graphic planning system of GIS and VR technology. microcomputer information (2004)

5. Xie Zhongjun, J.: A summary of three dimensional GIS aided agricultural planning. applied science (2008)

6. Penggen, Tuwei, Liu Shaohua, Chen Honghua, J.: Research and application of 3D geological model construction method. Journal of Jilin University: Earth Science Edition 4 (2),309-313(2004)

7. Chen Yingbiao, Zhong Ershun, J.: Three dimensional visualization management system of mine geological exploration and Research on the modeling technology Tian. Research and development of mining industry24 (1), 37-40(2004)

8. Chen Yingbiao, J.: Bell ear research mine geological exploration and visualization management system modeling Mining Research and Development24 (1), 37-40(2004)

9. Wang Minghua, J.: Three-dimensional geological modeling of clouds present situation and development trend geotextile base 20 (4), 68-70(2006)

10. Zhang Kai election, Wu Wenbo, Bai Yunfeng, J.: and other three-dimensional geological ArcGIS-based visualization Liaoning Technical University26 (3), 345-347(2007)