The lidR package
lidR
package
1 Introduction
lidR
is an R package for manipulating and visualizing airborne laser scanning (ALS) data with an emphasis on research & development for forestry and ecology applications. The package is entirely open source and is integrated within the geospatial R ecosystem (i.e., raster/terra/stars
and sp/sf
). This guide has been written to help both the ALS novice and seasoned point cloud processing veterans. Key functionality of lidR
includes functions to:
- Read and write
.las
and.laz
files and render customized point-cloud displays (chapter 2) - Process point clouds, including point classification (chapter 3), digital terrain models (chapter 4), normalization (chapter 5), and digital surface models (chapter 6)
- Perform individual tree segmentation (chapter 7)
- Compute standard metrics at different levels of regularization (chapters 8, 9, 10, 11, 12, 13)
- Manage processing for sets of point-cloud files - referred to as a
LAScatalog
(chapters 14, 15) - Implement guidelines for area-based approaches to forest modeling using ALS data (chapter 16)
- Facilitate user-defined processing streams for research and development (chapter 17)
- Understand spatial indexing (chapter 18)
- Discover the plugin system (chapter 19)
2 Development
The current release version of lidR
can be found on CRAN, and the source code is hosted on GitHub. Development of the lidR
package was made possible thanks to the financial support of:
- 2015-2018: the AWARE project NSERC CRDPJ 462973-14; grantee Prof. Nicholas C. Coops and Laval University.
- 2018-2021: the financial support of the Ministère des Forêts, de la Faune et des Parcs of Québec and Laval University.
- 2021-2024: Laval University.
Since 2024, the lidR
package (as well as the lasR
package) is no longer supported by Laval University. While the software will remain free and open-source, r-lidar
has transitioned into a company to ensure sustainability. We now offer independent services for training courses, consulting, and development. For more information, please visit our website: r-lidar.com.
3 Other Lidar Packages
For a package focused on production rather than R&D, the reader can look at the lasR
package, which is not covered in this book. The lasR
package is much more powerful than lidR
and is designed to process terabytes of data. However, the counterpart is that it does not allow easy and handy manipulation of the point cloud in R like lidR
. Both tools tagert different usages.
4 Installation
In R simply type:
install.packages("lidR")
For linux user you need some external libraries
# Ubuntu
sudo apt-get install libgdal-dev libgeos++-dev libudunits2-dev libproj-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libxt-dev libfftw3-dev
# Fedora
sudo dnf install gdal-devel geos-devel udunits2-devel proj-devel mesa-libGL-devel mesa-libGLU-devel freetype-devel libjpeg-turbo-devel
The book is shared under CC-BY-NC-SA 2.0
This book was created to provide hands-on descriptions and tutorials for using lidR
and is not the formal package documentation. The comprehensive package documentation is shipped with the package.