R software rlas 1.10.1 adds parallel reads for local lidar point clouds
A new ncores option can use multiple threads to decode local LAS, LAZ, and COPC files. The release also fixes extra attribute types and a point count case in LAS 1.4.
Which files can use parallel reads?
The R package rlas reached version 1.10.1 on CRAN on November 28 at 11:30:28 UTC, or 14:30:28 in Istanbul. The independent CRANberries tracker recorded the changes from version 1.10.0. The release adds an ncores argument to read.las and read_and_write.las. According to its notes, eligible local LAS, LAZ, and COPC files can be decoded on multiple threads. The default is one thread, and zero requests all available cores. The package uses sequential reads when the input cannot be decoded in parallel, including remote files. That distinction matters for a script that can switch between workstation storage and a remote service.
Separate point decoding from the rest of the pipeline
Lidar point clouds record coordinates from many returns, often with other attributes such as intensity or classification. LAZ can carry compressed point data. COPC arranges LAZ-based data for spatial access. Decoder threads apply to only part of the path from storage to an R object. An analyst can compare the same local LAZ file using one thread and four threads while keeping the selected attributes constant. Storage throughput and R object creation also contribute to total elapsed time. A meaningful performance record includes file size, position of the input on the machine, and any other jobs running at the same time.
Attribute types and file headers also changed
The source release notes describe a fix for integer extra-byte attributes stored with flags for a scale of one and offset of zero. The code can now retain them as integers in that case. Downstream code that checks column types can test this change with the same file on both package versions. The package also writes zero to the reserved field in variable-length record headers, as required by the format. It includes a fix to memory preallocation and progress reporting for an LAS 1.4 file whose legacy point count is zero. These details concern file compatibility independently of the parallel decoder.
Choose concurrency for the complete job
A workstation may have several jobs reading separate tiles already. Giving each job all available cores can produce more competition for CPU and storage. Compare an individual read and a representative group of reads. Record elapsed time for both. It is also useful to compare point counts and the resulting attributes under sequential and parallel reads. A remote input crosses another boundary, where network throughput and the storage host influence timings. The release notes explain that remote input uses the sequential path. That gives teams a reason to keep remote and local cases separate when they report the result.
A small verification before rollout
Read one local dataset sequentially and in parallel, then compare coordinates and classification values. Use a second fixture for integer extra-byte attributes or the LAS 1.4 point count case. A failing decode is another testable case because the update now passes through a more specific LASlib error message. Record the release version and reader options with the results. The change made available by the package is parallel decoding for eligible local inputs, together with the documented format fixes. The speed and memory effects depend on the files, hardware, and surrounding workload.
Archive photo · U.S. Geological Survey ↗ · Public domain · An illustrative USGS lidar point cloud from a separate dataset.
Sources and verification
- Primary sourceCRAN ↗
- Reporting / cross-checkCRANberries ↗
- BackgroundUSGS ↗
Reader discussion
Which alternative architecture would you try for the same problem?
No comments yet. Be the first to contribute.
Write a comment