Research on the Method of Building Dem by Contours

Digital elevation model (DEM), as an important product of digital photogrammetry and digital surveying and mapping, it plays an increasingly important role in the field of surveying and mapping and geographic information system. In this paper, it introduces the current generation methods of DEM by contour, and analyzes those interpolation methods that commonly are used to build DEM, and then describes the advantages and disadvantages of different building DEM methods systematically. Focusing on the DEM that represented by Grid and TIN, it compares the optimization methods of interpolation contour data systematically, and makes the contour interpolating DEM reflect the surface condition of the real nature more effectively.


Introduction
As a kind of basic data, the digital elevation model, DEM, plays an important role in Geomatics (mainly in Geographic Information System).The application of digital elevation model requires the high-quality DEM, and the contour map is an important and inexpensive source to generate DEM, which has an important research value and significance.The DEM data mainly be obtained through digitizing the paper topographic map, processing the aerial remote sensing image and surveying and mapping.At present, digitizing the paper topographic map is the more convenient and effective method to build the DEM.The contour map is an important carrier which employs two-dimensional plane to represent three-dimensional terrain.That can greatly reduce the personnel cost and effectively guarantee the DEM precision using the digital contour map to generate practically the DEM.
Once the DEM build by the contour map can meet the required geometric accuracy, the terrain contour will be the most important data source to construct the DEM.Although building DEM by contour has been already be studied, most of the literatures did not pay enough attention to the changes of some terrain.In various geological applications, the accuracy of the DEM is the most remarkable question, because its quality affects the precision of the subsequent application results.Therefore, it is important to research the high-quality DEM based on contour and provide highquality data sources for the subsequent application [1].In this paper, the commonly methods of generating the DEM by contours, namely Grid DEM and Triangulated Irregular Network (TIN) DEM, are analyzed and compared.Based on contour map generating the high-quality DEM, this paper studies the contour discretization, data interpolation, the process of generating the DEM, and finally presents the generating process of the DEM through the experiment.

Technical Proposals
The main technology of this paper includes the TIN construction, the contour discretization, the conversion the TIN to grid, the DEM interpolation, and so on.The specific technology process is shown in Figure 1.

Construction of TIN DEM by contours
TIN usually has its own unique advantages to be used to describe the surface of the terrain using the different resolution.The TIN can be constructed by the following three steps:

1) Divide the original data into blocks
In order to quickly retrieve the adjacent points of the processed triangle without having to retrieve the desired data, the original data should be divided into blocks.

2) Determine the first triangle
Firstly, a point A is selected from data points arbitrarily.Secondly, the nearest point of point A is obtained as point B.
Then points near point A and B are regarded as Where, is satisfied, j C is referred to as the third vertex of this triangle.In general TIN has many forms, and the Figure 2 shows two forms of the TIN.

2.2Contour established the Grid DEM
Digital elevation model can be extracted from different digital terrain model(DTM), such as GRID DEM, contour and irregular triangle network DEM.The generation of GRID from contours is simply considered to process the line and convert discrete points.Because the size of the grid is fixed, the DEM can be stored in a two-dimensional array in the computer.We can regard the stored elevation value as the elevation of the center point of the grid or the average value of the grid points, so we can obtain the elevation value of each point by interpolation method from these grids.The Gird DEM is shown in Figure 3.

2.3Discretization of contour
Discretization of the contour is regard as the procedure that the contour data is converted to discrete points, and then discrete data is interpolated to get the grid elevation value [2].
In the process of building digital elevation model, the interpolation is the necessary relevant processing after the discretization of the contour.Through the interpolation we can realize the transition of the points state from disordered ordered state [3].In this paper, the multiple methods are adopted to generate DEM and visibility analysis is carried out to the results.

2.4Interpolation algorithm of the DEM
Interpolation is the method of extrapolating the unknown data based on the given data [4].In general, interpolation is divided into three stages: data sampling, data processing and data recording.This paper's research methods mainly involve: Inverse Distance Weighted method, spline interpolation method, Kriging Interpolation method and Natural Neighbor interpolation method.

1) Inverse Distance Weighted, IDW
The inverse distance weighted interpolation is that in order to obtain the unknown value of the point the weighted calculation is carried out through the value of the other points which is adjacent to the point of unknown value, when the weighting value depends on the distance between the points [5].The algorithm formula is as bellow: Where, ( , ) z x y is estimate of the interpolation point at the location ( , ) x y ; n is the number of measured samples; i d is the distance between point i and interpolation points; z i is the numerical of i th known point; p is power of distance, and it has great influence on the interpolation results, whose selection criterion is the minimum of the mean absolute error.In this paper, 2 p is selected in the experiment.

2) Spline Function Interpolation
Spline function interpolation method is one of the accurate interpolations, where all sampling points occupy the interpolation surface and range of the value of the sample points did not completely limit estimation value of interpolation points [6].In this paper, the tension spline interpolation method is adopted [7].

3) Kriging Interpolation
This method also fully uses the spatial correlation of points, which automatically identify the spatial distribution of points and as far as possible to eliminate the error caused by the nonuniform distribution of sampling points.Its formula is as follow:

4) Natural Neighbor Interpolation, NNI
It is the new method of gridding.The basic principle of the method is that a group of primeval Thiessen polygons are modified to generate new Thiessen polygons when the data set is added a new point, where the interpolation weights is determined by the average value of the neighbor points weights and proportional to the Thiessen polygons.

3
Related Experiment and Analysis

3.1Experiment data
In this paper, we select the map of Hegang, Heilongjiang Province to test the satellite image map as shown in Figure 4.
The projection coordinate system is GCS_Beijing_1954, the projection type is Gauss Kruger.

3.2Discretization of contour map
First of all, the file format needs to be converted.The page window of the file conversion function is as shown in Figure 5(a).The line file is not assigned, so the contour assignment should be firstly carried out.It is assigned the starting elevation of the line, which is 440 meters.The contour interval is 10 for the contour.Because of the selection method of the paper is from high to low, the increment of height should be -10 meters.The assigned contour is shown in Figure 5   The second step is data preprocessing.Because there is no elevation value in attribute table when the elevation value of points in attribute table of MAPGIS 6.7 is shown as "label" type in ArcGIS 10, we need data preprocessing.The process includes: we click the "Preview" button and modify preview mode to table; in the pop-up menu, we choose "add fields" tab and will name the field as "ELEV", whose type is selected as double precision, and accuracy and scale is the same to the "label"; we open ArcMap to modify the point data, and then open the data attribute table; click the editor and start to edit attribute table.

3.3Generate DEM by Interpolation method
The DEM is generated based on the aforementioned principle of the interpolation and Grid, where we employ four interpolation to build DEM seen as Figure 6.

3.4Result Analysis
According to the spatial distribution maps it can be seen that the main elevation difference of the area is to be reflected around the terrain structure lines; the main elevation difference among different Grid DEMs is appeared on the flat top of the mountain and the flat area, which are constructed by the conversion of TIN to Gird, spline function, NNI and IDW method.The value of the elevation constructed by the conversion of TIN to Gird is often larger than value of the elevation constructed the spline function; the main elevation difference between NNI and the conversion of TIN to Gird lies in the ridge, valleys, r and flat areas, which has larger area and no contour; the value of the elevation constructed by the conversion of TIN to Gird is close to by NNI method; the value of the elevation constructed by IWD method is close to by Kriging method.

Conclusion
In this paper, the theory and method of the DEM generation from contour map has been described, and the interpolation algorithm of the DEM generation from contour map is analyzed systematically through experiments, where four algorithms are employed in these experiments such as spline function, Kriging, NNI and IDW method.According to the distribution map of spatial error, we analyze the results of different method.The experiment results show that different approaches should apply to different practical applications, especially building DEM from the flat area and the change area of the terrain structure.Based on these experiments, we can build high-quality DEM taking requirements into account.It should be noted that the contour map is small experiments, and in the future the bigger and more complex map will be employed for further study.
point i C A, and B to form a triangle.Finally the cosine the angle of each triangle vertex is calculated following formula 1.

Figure 3 .
Figure 3. Digital elevation surface model of GRID is the estimate of the interpolation point at the location ( , )x y ;, i O is the weighted value of the i sampling points.

Figure 5 .
Figure 5.The process of contour generation

Figure 6 .
Figure 6.Four results of interpolation methods based on GridFor TIN, the basic idea of constructing DEM is firstly to generate TIN by contour and then transfer TIN to GRID.In order to analyze the elevation difference of different interpolation algorithms, the error map is directly used to reflect the error of different interpolation algorithms.Results are shown as Figure7.

Figure 7 .
Figure 7.The results of TIN method for constructing DEM