Write a LAS or LAZ file at any step of the pipeline (typically at the end). Unlike other stages, the output won't be written into a single large file but in multiple tiled files corresponding to the original collection of files.
Arguments
- ofile
character. Output file names. The string must contain a wildcard * so the wildcard can be replaced by the name of the original tile and preserve the tiling pattern. If the wildcard is omitted, everything will be written into a single file. This may be the desired behavior in some circumstances, e.g., to merge some files.
- filter
the 'filter' argument allows filtering of the point-cloud to work with points of interest. For a given stage when a filter is applied, only the points that meet the criteria are processed. The most common strings are
Classification == 2"
,"Z > 2"
,"Intensity < 100"
. For more details see filters.- keep_buffer
bool. The buffer is removed to write file but it can be preserved.
Examples
f <- system.file("extdata", "Topography.las", package="lasR")
read <- reader()
tri <- triangulate(filter = keep_ground())
normalize <- tri + transform_with(tri)
pipeline <- read + normalize + write_las(paste0(tempdir(), "/*_norm.las"))
exec(pipeline, on = f)
#> [1] "/tmp/RtmpUXX9w7/Topography_norm.las"