2

I'm tying to load a catalog and simply re-export the same tiling, but only with xyz attributes, whatever attributes are found in my original list of LiDAR tiles.

Here the code I use :

library(lidR)
ctg <- readLAScatalog(lidar_input_tiles_path, select = "xyz")
opt_select(ctg) <- "xyz" # Duplicate
opt_output_files(ctg) <- "[...]/{ORIGINALFILENAME}"
ctg2 <- catalog_retile(ctg)

It looks like the select option is not taken in account. On the other hand, when I use the readLAS() function on a single file, select parameters are applied.

Am I missing something?

2 Answers 2

2

Your problem is documented in the man page of catalog_retile. catalog_retile preserves the file format. No way to keep only xyz. The options select is not respected. The reason is that catalog_retile() is a special, memory optimized, function that by-passes regular LAScatalog processing engine behaviour and never calls readLAS() and never loads a single point in R. This allows to retile efficiently big files that do not fit in memory

Supported processing options

Supported processing options for a LAScatalog (in bold). For more details see the LAScatalog engine documentation:

  • chunk_size: Size of the new tiles.
  • buffer: Load new tiles with a buffer. The expected value is usually 0.
  • alignment: Alignment of the new tiles.
  • progress: Displays a progress estimation.
  • output_files*: Mandatory. The new tiles will be written in new files.
  • laz_compression: save las or laz files.
  • select: catalog_retile preserve the file format anyway.
  • filter: Retile and save only the points of interest.
0
0

The filter and select options are not modifiable using when processing a collection of files. From the docs:

enter image description here

1
  • 1
    They are. But not in all functions.
    – JRR
    Dec 9, 2021 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.