normalize: Relative Coordinates and Density Reduction for TLS Point...

Description Usage Arguments Details Value Output Files Note Author(s) References See Also Examples

View source: R/normalize.R

Description

This function obtains coordinatesrelative to the plot centre for Terrestrial Laser Scanner (TLS) point clouds (supplied as LAS files) derived from single scans (with TLS scanner point as plot centre). In addition, the point cropping process developed by Molina-Valero et al., (2019) is applied as a criterion for reducing point density homogeneously in space and proportionally to object size.

Usage

1
2
3
4
5
normalize(las,
          max.dist = NULL, min.height = NULL, max.height = NULL,
          algorithm.dtm = "tin", res.dtm = 0.2,
          id = NULL, file = NULL,
          dir.data = NULL, save.result = TRUE, dir.result = NULL)

Arguments

las

Character string containing the name of LAS file belonging to TLS point cloud, including .las extension (see ‘Examples’). Planimetric coordinates of point cloud data must be in local, representing TLS scan point the origin with Cartesian coordinates x and y as (0, 0).

max.dist

Optional maximum horizontal distance (m) considered from the plot centre. All points farther than max.dist will be discarded after the normalization process. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, all points will be used in processing, with max.dist representing the farthest point.

min.height

Optional minimum height (m) considered from ground level. All points below min.height will be discarded after the normalization process. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, all points will be used in processing, with min.height representing the lowest point.

max.height

Optional maximum height (m) considered from ground level. All points above max.height will be discarded after the normalization process. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, all points will be used in processing, with max.height representing the highest point.

algorithm.dtm

Algorithm used to generate the digital terrain model (DTM) from the TLS point cloud. There are two posible options based on spatial interpolation: ‘tin’ and ‘knnidw’ (see ‘Details’). If this argument is not specified by the user, it will be set to ‘tin’ algorithm.

res.dtm

numeric. Resolution of the DTM generated to normalize point cloud (see ‘Details’). If this argument is not specified by the user, it will be set to 0.2 m.

id

Optional plot identification encoded as character string or numeric. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, the plot will be encoded as 1.

file

Optional file name identification encoded as character string or numeric value. If it is null, file will be encoded as id by default.

dir.data

Optional character string naming the absolute path of the directory where LAS files containing TLS point clouds are located. .Platform$file.sep must be used as the path separator in dir.data. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, the current working directory of the R process will be assigned to dir.data during the execution.

save.result

Optional logical which indicates whether or not the output files described in ‘Output Files’ section must be saved in dir.result. If this argument is not specified by the user, it will be set to TRUE by default and, as consequence, the output files will be saved.

dir.result

Optional character string naming the absolute path of an existing directory where files described in ‘Output Files’ section will be saved. .Platform$file.sep must be used as the path separator in dir.result. If this argument is not specified by the user, and save.result is TRUE, it will be set to NULL by default and, as a consequence, the current working directory of the R process will be assigned to dir.result during the execution.

Details

Relative coordinates are obtained by means of a normalization process, generating a digital terrain model (DTM) from the TLS point cloud, with the ground height set at 0 m. The DTM is generated by spatial interpolation of ground points classified with the CSF algorithm (Zhang et al., (2016)). Two algorithms are available for that purpose: (i) spatial interpolation based on a Delaunay triangulation, which performs a linear interpolation within each triangle (‘tin’); (ii) spatial interpolation using a k-nearest neighbour (KNN) approach with inverse-distance weighting (IDW) (‘knnidw’). Note that normalization process is based on lidR package functions: classify_ground, grid_terrain and normalize_height.

The point cropping process reduces the point cloud density proportionally to the likelihood that objects will receive points according to their distance from TLS and their size, which is determined by angle aperture (the farther they are, the lower the density is). The result is an approximately homogeneous point cloud in three-dimensional space (for more details see Molina-Valero et al., (2019)).

Value

Data frame of normalized point cloud including the following columns (each row corresponds to one point):

id

Plot identification encoded as a character string or numeric in the argument id.

file

File name identification encoded as character string or numeric, corresponding to the normalized and reduced point clouds saved. This coincides with the TXT file in the absolute path specified in dir.result (if save.result is set to TRUE).

Coordinates

Cartesian (according to https://en.wikipedia.org/wiki/Cartesian_coordinate_system notation):

  • x: x axis distance (m).

  • y: y axis distance (m).

  • z: height (m).

Cylindrical (according to https://en.wikipedia.org/wiki/Cylindrical_coordinate_system notation):

  • rho: horizontal distance (m).

  • phi: angular coordinate (rad).

  • z: height (m).

Spherical (according to https://en.wikipedia.org/wiki/Spherical_coordinate_system notation):

  • r: radial distance (m).

  • theta: polar angle (rad).

  • phi: azimuthal angle (rad)

slope

Slope of the terrain (rad).

prob

selection probability assigned in point cropping process (0-1]. Only the farthest will have probability of 1.

prob.select

final selection probability assigned in point cropping process. Selected (1) and discarded point (0).

Output Files

At the end of the normalization process, if the save.result argument is TRUE, the function will save the reduced point cloud as TXT file and encoded according to file argument. The format is the same as data frame described in ‘Value’, except for a prob column, which is removed because all points selected after the point cropping process have a final selection probability of 1. The data frame is written without row names in dir.result directory using the vroom_write function in the vroom package.

Note

Note that max.dist, min.height and max.height arguments may be useful for optimizing computing time as well as for removing unnecessary and/or outlier points. These values may be selected more appropriately when inventory data are already available, or the user has some knowledge about autoecology of scanned tree species.

Note also that the linear interpolation algorithm (‘tin’ in this package) showed the highest accuracy in Liang et al., (2018) in DTM generation with single-scans. In this work a DTM resolution of 0.2 m was also considered adequately for square plots of 32 x 32 m.

Author(s)

Juan Alberto Molina-Valero, María José Ginzo Villamayor, Manuel Antonio Novo Pérez, Adela Martínez-Calvo, Juan Gabriel Álvarez-González, Fernando Montes and César Pérez-Cruzado.

References

Liang, X., Hyyppä, J., Kaartinen, H., Lehtomäki, M., Pyörälä, J., Pfeifer, N., ... & Wang, Y. (2018). International benchmarking of terrestrial laser scanning approaches for forest inventories. ISPRS journal of photogrammetry and remote sensing, 144, 137-179. doi: 10.1016/j.isprsjprs.2018.06.021

Molina-Valero J. A., Ginzo-Villamayor M. J., Novo Pérez M. A., Álvarez-González J. G., & Pérez-Cruzado C. (2019). Estimación del área basimétrica en masas maduras de Pinus sylvestris en base a una única medición del escáner laser terrestre (TLS). Cuadernos de la Sociedad Espanola de Ciencias Forestales, 45(3), 97-116. doi: 10.31167/csecfv0i45.19887.

Zhang, W., Qi, J., Wan, P., Wang, H., Xie, D., Wang, X., & Yan, G. (2016). An easy-to-use airborne LiDAR data filtering method based on cloth simulation. Remote Sensing, 8(6), 501. doi: 10.3390/rs8060501.

See Also

tree.detection, tree.detection.multiple.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Establishment of working directories (optional)
# By default here we propose the current working directory of the R process

dir.data <- getwd()
dir.result <- getwd()


# Loading example data (LAS file) to dir.data

download.file("https://www.dropbox.com/s/2c3d320o3srcawb/1.las?raw=1",
              destfile = file.path(dir.data, "1.las"),
              method = "wininet", mode = "wb")


# Normalizing the whole point cloud data without considering arguments

pcd <- normalize(las = "1.las", dir.data = dir.data, dir.result = dir.result)


# Using all the arguments

pcd <- normalize(las = "1.las",
                 max.dist = 15, min.height = 0.25, max.height = 25,
                 id = "1", file = "1.txt",
                 dir.data = dir.data, dir.result = dir.result)

  

FORTLS documentation built on April 21, 2021, 9:06 a.m.