lidR
An R package for airborne LiDAR data manipulation and visualization for forestry application.
https://github.com/r-lidar/lidR
Category: Biosphere
Sub Category: Forest Remote Sensing
Keywords
als forestry las laz lidar point-cloud r remote-sensing
Keywords from Contributors
earth-observation asprs
Last synced: about 16 hours ago
JSON representation
Repository metadata
Airborne LiDAR data manipulation and visualisation for forestry application
- Host: GitHub
- URL: https://github.com/r-lidar/lidR
- Owner: r-lidar
- License: gpl-3.0
- Created: 2016-02-17T11:47:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-02-06T14:36:44.000Z (3 months ago)
- Last Synced: 2025-04-25T14:08:03.142Z (1 day ago)
- Topics: als, forestry, las, laz, lidar, point-cloud, r, remote-sensing
- Language: R
- Homepage: https://CRAN.R-project.org/package=lidR
- Size: 36.8 MB
- Stars: 626
- Watchers: 49
- Forks: 134
- Open Issues: 11
- Releases: 40
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- Funding: .github/FUNDING.yml
- License: COPYING
README.md
lidR
R package for Airborne LiDAR Data Manipulation and Visualization for Forestry Applications
The lidR package provides functions to read and write .las
and .laz
files, plot point clouds, compute metrics using an area-based approach, compute digital canopy models, thin LiDAR data, manage a collection of LAS/LAZ files, automatically extract ground inventories, process a collection of tiles using multicore processing, segment individual trees, classify points from geographic data, and provides other tools to manipulate LiDAR data in a research and development context.
- 📖 Read the book to get started with the lidR package.
- 💻 Install
lidR
from R with:install.packages("lidR")
- 💵 Sponsor
lidR
. It is free and open source, but requires time and effort to develop and maintain.
lidR
has been cited by more than 1,000 scientific papers. To cite the package use citation()
from within R:
citation("lidR")
#> Roussel, J.R., Auty, D., Coops, N. C., Tompalski, P., Goodbody, T. R. H., Sánchez Meador, A., Bourdon, J.F., De Boissieu, F., Achim, A. (2021). lidR : An R package for analysis of Airborne Laser Scanning (ALS) data. Remote Sensing of Environment, 251 (August), 112061. <doi:10.1016/j.rse.2020.112061>.
#> Jean-Romain Roussel and David Auty (2023). Airborne LiDAR Data Manipulation and Visualization for Forestry Applications. R package version 3.1.0. https://cran.r-project.org/package=lidR
You may also be interested by our new lasR
package.
Key features
Read and display a las file
In R-fashion style the function plot
, based on rgl
, enables the user to display, rotate and zoom a point cloud. Because rgl
has limited capabilities with respect to large datasets, we also made a package lidRviewer with better display capabilities.
las <- readLAS("<file.las>")
plot(las)
Compute a canopy height model
lidR
has several algorithms from the literature to compute canopy height models either point-to-raster based or triangulation based. This allows testing and comparison of some methods that rely on a CHM, such as individual tree segmentation or the computation of a canopy roughness index.
las <- readLAS("<file.las>")
# Khosravipour et al. pitfree algorithm
thr <- c(0,2,5,10,15)
edg <- c(0, 1.5)
chm <- rasterize_canopy(las, 1, pitfree(thr, edg))
plot(chm)
Read and display a catalog of las files
lidR
enables the user to manage, use and process a collection of las
files. The function readLAScatalog
builds a LAScatalog
object from a folder. The function plot
displays this collection on an interactive map using the mapview
package (if installed).
ctg <- readLAScatalog("<folder/>")
plot(ctg, map = TRUE)
From a LAScatalog
object the user can (for example) extract some regions of interest (ROI) with clip_roi()
. Using a catalog for the extraction of the ROI guarantees fast and memory-efficient clipping. LAScatalog
objects allow many other manipulations that can be done with multicore processing.
Individual tree segmentation
The segment_trees()
function has several algorithms from the literature for individual tree segmentation, based either on the digital canopy model or on the point-cloud. Each algorithm has been coded from the source article to be as close as possible to what was written in the peer-reviewed papers. Our goal is to make published algorithms usable, testable and comparable.
las <- readLAS("<file.las>")
las <- segment_trees(las, li2012())
col <- random.colors(200)
plot(las, color = "treeID", colorPalette = col)
Wall-to-wall dataset processing
Most of the lidR functions can seamlessly process a set of tiles and return a continuous output. Users can create their own methods using the LAScatalog
processing engine via the catalog_apply()
function. Among other features the engine takes advantage of point indexation with lax files, takes care of processing tiles with a buffer and allows for processing big files that do not fit in memory.
# Load a LAScatalog instead of a LAS file
ctg <- readLAScatalog("<path/to/folder/>")
# Process it like a LAS file
chm <- rasterize_canopy(ctg, 2, p2r())
col <- random.colors(50)
plot(chm, col = col)
Full waveform
lidR can read full waveform data from LAS files and provides interpreter functions to convert the raw data into something easier to manage and display in R. The support of FWF is still in the early stages of development.
fwf <- readLAS("<fullwaveform.las>")
# Interpret the waveform into something easier to manage
las <- interpret_waveform(fwf)
# Display discrete points and waveforms
x <- plot(fwf, colorPalette = "red", bg = "white")
plot(las, color = "Amplitude", add = x)
About
lidR
is developed openly by r-lidar.
The initial development of lidR
was made possible through the financial support of Laval University, the AWARE project and [Ministry of Natural Ressources and Forests]((https://www.quebec.ca/en/government/ministere/ressources-naturelles-forets) of Québec. To continue the development of this free software, we now offer consulting, programming, and training services. For more information, please visit our website.
Install dependencies on GNU/Linux
# Ubuntu
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
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
Owner metadata
- Name: R lidar
- Login: r-lidar
- Email:
- Kind: organization
- Description: R + lidar
- Website: https://github.com/r-lidar
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/93974705?v=4
- Repositories: 5
- Last ynced at: 2023-03-05T21:37:51.016Z
- Profile URL: https://github.com/r-lidar
GitHub Events
Total
- Issues event: 28
- Watch event: 38
- Issue comment event: 42
- Push event: 12
- Pull request event: 7
- Fork event: 6
Last Year
- Issues event: 28
- Watch event: 38
- Issue comment event: 42
- Push event: 12
- Pull request event: 7
- Fork event: 6
Committers metadata
Last synced: 7 days ago
Total Commits: 2,566
Total Committers: 18
Avg Commits per committer: 142.556
Development Distribution Score (DDS): 0.043
Commits in past year: 59
Committers in past year: 3
Avg Commits per committer in past year: 19.667
Development Distribution Score (DDS) in past year: 0.068
Name | Commits | |
---|---|---|
Jean-Romain | j****1@u****a | 2455 |
Dave Auty | d****y@g****m | 55 |
Florian de Boissieu | f****s@g****m | 22 |
Andrew Sánchez Meador | a****r@n****u | 12 |
Duncan Murdoch | m****n@g****m | 3 |
frank2165 | m****0@g****m | 3 |
Quinn Bowers | q****n@r****m | 3 |
bw4sz | b****0@g****m | 2 |
Jean-François Bourdon | 3****n | 2 |
David Auty | d****y@l****n | 1 |
Vijay | v****a@i****u | 1 |
Leon Steinmeier | l****s@g****e | 1 |
Markus Neteler | n****r@g****m | 1 |
Michael Koontz | m****z@g****m | 1 |
Piotr Tompalski | p****i@g****m | 1 |
Roger Bivand | r****d@n****o | 1 |
Walter Somerville | w****m@g****m | 1 |
cjber | 4****r | 1 |
Committer domains:
- nhh.no: 1
- gmx.de: 1
- iupui.edu: 1
- localhost.localdomain: 1
- robotics88.com: 1
- nau.edu: 1
- ulaval.ca: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 591
Total pull requests: 62
Average time to close issues: 17 days
Average time to close pull requests: 8 days
Total issue authors: 228
Total pull request authors: 22
Average comments per issue: 4.06
Average comments per pull request: 3.06
Merged pull request: 43
Bot issues: 0
Bot pull requests: 0
Past year issues: 44
Past year pull requests: 4
Past year average time to close issues: 12 days
Past year average time to close pull requests: 10 days
Past year issue authors: 32
Past year pull request authors: 3
Past year average comments per issue: 2.93
Past year average comments per pull request: 4.0
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- Jean-Romain (99)
- spono (34)
- lucas-johnson (20)
- wiesehahn (15)
- jmmonnet (12)
- Saadi4469 (11)
- ouroukhai (10)
- ptompalski (9)
- floriandeboissieu (8)
- bi0m3trics (8)
- komazsofi (7)
- bw4sz (7)
- karnayogendra (7)
- jgrn307 (6)
- rs806 (6)
Top Pull Request Authors
- floriandeboissieu (21)
- Jean-Romain (8)
- MarcFletcher-HQP (4)
- dmurdoch (3)
- mikoontz (3)
- jfbourdon (2)
- bw4sz (2)
- bi0m3trics (2)
- quinn-r88 (2)
- Lenostatos (2)
- ptompalski (2)
- rhijmans (1)
- mavavilj (1)
- jstrunk001 (1)
- neteler (1)
Top Issue Labels
- Question (169)
- Bug (142)
- Enhancement (74)
- Feature request (67)
- Wontfix (42)
- Documentation (33)
- Not lidR (23)
- CRAN (14)
- No anwser (12)
- Duplicate (9)
- Rejected request (8)
- v4 beta (8)
- Segfault (7)
- Windows (4)
- rlas (4)
- Devel (1)
Top Pull Request Labels
- Bug (3)
- Enhancement (2)
Package metadata
- Total packages: 2
-
Total downloads:
- cran: 4,328 last-month
- Total docker downloads: 990,939
- Total dependent packages: 10 (may contain duplicates)
- Total dependent repositories: 23 (may contain duplicates)
- Total versions: 51
- Total maintainers: 2
cran.r-project.org: lidR
Airborne LiDAR Data Manipulation and Visualization for Forestry Applications
- Homepage: https://github.com/r-lidar/lidR
- Documentation: http://cran.r-project.org/web/packages/lidR/lidR.pdf
- Licenses: GPL-3
- Latest release: 4.1.2 (published 10 months ago)
- Last Synced: 2025-04-25T14:05:22.583Z (1 day ago)
- Versions: 50
- Dependent Packages: 10
- Dependent Repositories: 23
- Downloads: 4,328 Last month
- Docker Downloads: 990,939
-
Rankings:
- Forks count: 0.504%
- Stargazers count: 0.742%
- Dependent repos count: 5.762%
- Dependent packages count: 5.911%
- Average: 6.299%
- Downloads: 6.784%
- Docker downloads count: 18.093%
- Maintainers (1)
spack.io: r-lidr
Airborne LiDAR data manipulation and visualisation for forestry application
- Homepage: https://github.com/r-lidar/lidR
- Licenses: []
- Latest release: 4.1.2 (published 4 months ago)
- Last Synced: 2025-04-25T14:05:22.347Z (1 day ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Average: 28.054%
- Dependent packages count: 56.108%
- Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- methods * depends
- Rcpp >= 1.0.3 imports
- classInt * imports
- data.table >= 1.12.0 imports
- glue * imports
- grDevices * imports
- lazyeval * imports
- raster * imports
- rgl * imports
- rlas >= 1.5.0 imports
- sf * imports
- sp * imports
- stars * imports
- stats * imports
- terra >= 1.5 imports
- tools * imports
- utils * imports
- EBImage * suggests
- RCSF * suggests
- RMCC * suggests
- future * suggests
- geometry * suggests
- gstat * suggests
- knitr * suggests
- mapedit * suggests
- mapview * suggests
- progress * suggests
- rgdal * suggests
- rmarkdown * suggests
- testthat >= 2.1.0 suggests
- actions/cache v1 composite
- actions/checkout v3 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
Score: 23.15803231724272