NOISE REDUCTION IN CONTOUR LINES AND SLOPE MAPS FROM MEDIUM/HIGH-DENSITY LIDAR DATA

: The use of medium/high-density LIDAR (Light Detection And Ranging) data for land modelling and DTM (Digital Terrain Model) is becoming more widespread. This level of detail is difficult to achieve with other means or materials. However, the horizontal and vertical geometric accuracy of the LIDAR points obtained, although high, is not homogeneous. Horizontally you can reach precisions around 30-50 cm, while the vertical precision is rarely greater than 10-15 cm. The result of LIDAR flights, are clouds of points very close to each other (30-60 cm) with significant elevation variations, even if the terrain is flat. And this makes the triangulated models TIN (Triangulated Irregular Network) obtained from such LIDAR data especially chaotic. Since contour lines are generated directly from such triangulated models, their appearance shows excessive noise, with excessively broken and rapidly closed on themselves. Getting smoothed contour liness, without decreasing accuracy, is a challenge for terrain model software. In addition, triangulated models obtained from LIDAR data are the basis for future slope maps of the land. And for the same reason explained in the previous paragraph, these slope maps generated from high or medium density LIDAR point clouds are especially heterogeneous. Achieving uniformity and greater adjustment to reality by reducing the natural noise of LIDAR data is another added challenge. In this paper, the problem of excessive noise from LIDAR data of high (around 8 points/m 2 ) and medium density (around 2 points/m 2 ) in the generation of contour lines and terrain slope maps is raised and solutions are proposed to reduce this noise. All this, in the area of specific software for the management of TIN models and GIS (Geographic Information System) and adapting the alternatives proposed by these programmes.


Introduction
In this paper, the currently existing problem regarding the use of médium/high density LIDAR data for the generation of DTM will be described (Sharma et al. 2021) and more specifically, the obtaining of contour lines and slope maps drawn from them.
Someone may have the mistaken feeling that a higher resolution of the lidar data is, better digital models will be obtained and the more accurate the contour lines extracted from them will be.To focus on the question raised, the following Figure 1 is presented, which shows contour lines of a terrain of 2 km x 2 km in extension obtained by triangulating the LIDAR point cloud and a detail of a specific area within terrain.The LIDAR flight had an average density of 2 points/m 2 , which requires handling a total of approximately eight million points.In the detail of the previous figure it is observed how the generated contour lines are excessively sinuous and very broken.The explanation for this phenomenon should be sought precisely in the excessive variability of the vertical precision of the LIDAR points (López-Fernández et al. 2017), which will rarely be greater than 10 cm or 15 cm and in the existence of very close triangulated points.(between 40 and 60 cm) in point clouds between 2-6 points/m 2 .Throughout this paper, certain guidelines will be given to try to eliminate as much as possible this excessive sinuosity in the design of the contour lines and the excessive noise derived in the generated slope maps.

Material and Methods
As stated in the previous section, we will work with a LIDAR flight sheet (Plan Nacional de Ortofotografía Aérea, PNOA) for 2016, which covers an area of 4 km 2 and has an initial point density of 2 points/m 2 .The point cloud was classified and the terrain points were initially defined by around two million points.
The management of all this information until the terrain modeling is achieved can be done either through CAD3D programs (Hu et al. 2010) or through the tools of the Geographic Information Systems.As CAD3D software, AutoCAD CIVIL3D ® will be used and as GIS software, QGIS® will be used.
Regarding the strategies to be followed to achieve the proposed objectives of homogenizing the contour lines and reducing noise in slope maps, it should be noted that there are basically two possible paths:


or a simplification process is undertaken on the original data (LIDAR flight points);  or the contour lines obtained are subjected to some simplification and / or smoothing process.

Processing with CIVIL3D ®
For the dynamic management of the model in CIVIL3D ® , three simplification processes of the point cloud have been previously carried out, reducing the number of points to 1.470.941points and generating a triangulation of approximately two million triangles (Fig. 2).On many occasions, despite carrying out this type of simplification process, the models remain excessively complex (Schmid et al. 2011) and the contour lines generated maintain their sinuous condition and are loaded with abundant noise (Fig. 3). Figure 4 shows contour lines over the triangulation of the model, with different equidistance values.By observing these images, it is possible to understand the reason why the contour lines are so heterogeneous: small triangles between very close points (around one meter) whose height can contain a considerable margin of error, causing the path traveled by a contour line to have to adapt to highly changing triangle sides.A longitudinal profile on this model clearly detects the abrupt and abundant changes in slope typical of models from high-density LIDAR data (Mitasova et al. 2005).In Figure 5 we try to show this characteristic.In relation to the slope map generated from a model based on médium/high resolution LIDAR, something similar happens to that described for the contour lines (Fig. 6).The slope maps are generated directly by analysis of each of the model's triangles, and the vertices of the triangles that show some irregularity in their precision, generate a lot of noise in the obtained slope model.Adjacent triangles in flat terrain or with little slope, but uniform, show very different slopes precisely because of the imprecision of the height of the vertices of the triangles compared to the small lengths of the sides of the triangles.
Figure 7 shows the triangles of the digital terrain model and its slope texture, which clearly shows its low uniformity as it comes from a triangulation on mediumresolution LIDAR data.Another process on the digital model that can be performed in CIVIL3D is smoothing (Fig. 8), which consists of adding points at elevations determined by the system using the Natural Neighbor Interpolation (NNI) method or the Kriging method, which produces smoother contour lines.That is, points are eliminated and the model is more uniform, without such prominent ridges.
But it has a major drawback: more points are generated in the model and so are more triangles, which will slow down the modeling process.Regarding the slope model, the effect of the smoothing of the surfaces causes a greater homogeneity in the slope map.Assigned color transitions look smoother, with less contrast.Thus, simplification generates a similar effect (see Figure 9).

Processing with QGIS ® and external libraries
In GIS environment, there are also surface smoothing and simplification processes, the effect of which will also translate into more rounded contour lines and more homogeneous slope maps.
However, GIS presents a clear advantage over CAD3D programs in the management of digital terrain models (DTM) and is the possibility of combining raster and vector tools.
Thus, in this study, the raster DEM (Digital Elevation Model) with a resolution of 1 m was obtained from the original LIDAR point-terrain cloud, from which the contour lines with 5 m equidistance were obtained.The raster processing of the information greatly speeds up the calculation processes (Guo et al. 2010).However, see Figure 10, the results in terms of contour lines are similar: very rough contour lines and a lot of perimeter noise.The slope maps reflect well the slope changes in the different areas of the digital model (Stal et al. 2013) (see Figure 11).Simplification and smoothing processes in QGIS are carried out with the tools of this software or with external graphic libraries, such as GRASS and SAGA.Thus, raster analysis processes such as "filtering" or "sieving" are available, which eliminate raster polygons with a number of pixels below a threshold.The "roughness" or "irregularity" tool can also be very useful, which detects areas that differ from the surrounding areas due to their elevation or slope (see Figure 12).The light areas are flat areas, with few changes in the elevation of the terrain or in the slope and the dark areas are the areas of unevenness or abrupt changes in slope.SAGA library has a module called Smoothing ViGrA ("Vision with Generic Algorithms"), which smoothes the model by eliminating ridges and steep slopes (Lindsay et al. 2019).Another typical process in SAGA is the "simple filter" in its smooth mode, with the same purpose (Fig. 13).
GRASS also has specific modules for this same purpose, such as the "Mesh denoise" process, which reduces local elevation variations and reduces noise in the digital model (Fig. 14).In QGIS there are another processes that modify the geometry of the contour lines, without affecting the model.They are processes that require fewer computational resources and that generate more attractive contour lines with less noise.Two of them are described below based on the contour lines of the original 1m DTM model.In general, they are based on a combination of simplification and/or smoothing of contour lines previously generated with other processes (Figs. 15 and 16).

Results and discussion
In the previous section, different processes have been described for the simplification and smoothing of the digital models obtained from medium and high density LIDAR data.Solutions based on CAD3D software and solutions based on GIS have been proposed, as has already been commented (Table 1).The CAD3D software chosen has been AutoCAD CIVIL3D, which is highly oriented to providing solutions to site surveying and earthmoving projects in particular.In addition, it includes specific modules for linking to external databases to manage a wide variety of formats, such as DEM, LIDAR, etc.
As GIS software, QGIS has been chosen, due to its proven power in both raster and vector solutions.
CAD3D solutions attempt to directly address the high heterogeneity of the models, eliminating peaks and discontinuities, producing smoother contour lines with less noise and more realistic slope maps (Duan et al. 2021).It should be noted that the vector processes for smoothing and simplifying surfaces tend to require too many hardware resources and are usually slow processes.
In general, GIS solutions perform better than CAD3D solutions, since they require less processing time, less hardware resources (Liu 2008) and face the problem from two well differentiated points of view, but both in a powerful way: the processes vector and raster processes.They offer more versatility, since they allow directing the smoothing raster processes over the original DTMs and later combining other vector processes, simplifying and smoothing the contour lines obtained, thus achieving more realistic solutions.
At this point, it is necessary to remember that the main problem with digital models from médium/high density LIDAR data is the heterogeneity of the precision of the elevation of the points compared to the small distance between them.Any applied process must bear in mind this indisputable fact and attack it in a reasonable way, without excessively altering the original model.
It should also be noted that these processes do not try to solve a problem only of appearance of the final model, but rather they try to correct a question of extreme irregularity in the origin of the LIDAR data.Definitely, the objective of applying any process should be to arrive at more realistic solutions based on somewhat chaotic models.
As it has already been observed, a clear separation clear separation has not been made between contour lines smoothing processes and those aimed at homogenizing slope maps.This is because both concepts are closely related to the origin and structure of LIDAR data.Solving the heterogeneity of the elevations at the origin, both aspects are corrected with identical processes.

Conclusions
In this paper, several vector solutions and raster solutions that attempt to respond to the problem of models from high and medium resolution LIDAR data has been revealed.It has been shown that by means of vector processes from a CAD3D software or by raster processes from a GIS software, the original heterogeneous models can be simplified or smoothed and other models more in line with reality can be achieved, which ultimately show more homogeneous contour lines and areas of slope without so much noise.
In addition, the vector processes of GIS can also provide solutions to finish giving that necessary realism in the typical three-dimensional representation of the terrain through contour lines.
The constant development of algorithms for simplification and / or smoothing of DEMs in the field of Geographic Information Systems is now necessary.LIDAR data and other data sets from satellite platforms, increasingly voluminous and complex, will require powerful processes for their management and editing.

Figure 2 :
Figure 2: Triangulation and simplification process with CIVIL3D ® .In CIVIL3D there are basically two possibilities to simplify the digital model:  Edge contraction: removes edges and replaces them with single points, making the model smooth. Elimination of points: points are eliminated from the densest areas and in the percentage set by the user.

Figure 5 :
Figure 5: Longitudinal profiles on triangulated model and details showing abrupt changes in slopes.

Figure 6 :
Figure 6: Slope map on triangulated model showing little homogeneity and a lot of noise.

Figure 7 :
Figure 7: Triangulation and texture of model slopes.

Figure 8 :
Figure 8: Smoothing process of the model, generating more rounded contour lines.

Figure 9 :
Figure 9: Effect of surface simplification on the slope map of a model obtained from LIDAR data.

Figure 11 :
Figure 11: Slope map from DEM with QGIS.Detail of side slopes of Highway A-68.

Figure 13 :
Figure 13: SAGA "simple filter" process on original DTM model in area with a lot of noise and generated smoothing.

Figure 14 :
Figure 14: GRASS "Mesh denoise" process on original DTM model in area with a lot of noise and generated smoothing.

Figure 15 :
Figure 15: Original contour lines (5m equidistance) with excessive sinuosity and with high noise areas.

Figure 16 :
Figure 16: Simplification process of vector geometry on contour lines of the original model.The second process generates new contour lines with more number of vertices and adapted to a greater or lesser degree to the original geometries.Thus, by smoothing the geometry obtained in the previous step, it is achieved Figures 17 y 18.

Figure 17 :
Figure 17: Result of the process of simplifying and smoothing the contour lines in the original model (detail).

Figure 18 :
Figure 18: Result of the simplification and smoothing process in the original model (detail).