lidR: (A workshop for) Airborne Lidar Data Manipulation and Visualization for Environmental Applications

Authors
Affiliations

Liam A.K. Irwin

Integrated Remote Sensing Studio, University of British Columbia

Brent A. Murray

Integrated Remote Sensing Studio, University of British Columbia

Tristan R.H. Goodbody

Integrated Remote Sensing Studio, University of British Columbia

Jean-Romain Roussel

r-lidar consulting & development

Published

June 22, 2025

People

Presenters:

Liam Irwin (UBC)

Brent Murray (UBC)

Materials

This repository contains the material for an 80 minute lidR tutorial workshop. You should install the material on your own machine from this repository. It contains the code and point-clouds we will use. The workshop intends to:

  • Present an overview of what can be done with lidR
  • Give users an understanding of how lidR may fit their needs
  • Exercises will be done depending on available time - users are encouraged to work on these after the workshop!
Tip

Introduction slides: Intro to Airborne LiDAR & lidR

Download Workshop Materials

You can download the complete workshop package containing all code, data, and exercises here:

Download the LPS lidR Tutorial Package (.zip, 26 MB)

Download additional classified lidar files for 05_engine (.zip, 80 MB)

Download additional normalized lidar files for 05_engine (.zip, 78 MB)

Unzip the first to a folder, and run the .Rproj file with RStudio installed for the easiest experience. Unzip ctg_class.zip and ctg_norm.zip to their respective folders in data/ctg_*

Target Folder and Data Structure for Workshop Contents

Target Folder and Data Structure for Workshop Contents

Requirements

R version and Rstudio

  • You need to install a recent version of R i.e. R 4.x or newer.
  • We will work with Rstudio. This IDE is not mandatory to follow the workshop but is highly recommended.

R Packages

Tip

Easy setup for new users Please open the LPS_lidRtutorial_package.Rproj in RStudio. Next, open 01_read.R to run code to automatically install packages.

Please install the lidR package in its latest version (4.2.1).

install.packages("lidR")

To run all code in the tutorial locally, you will need to install the following packages. You can use lidR without them or follow along with provided code and outputs.

libs <- c("terra","viridis","future","sf","mapview")

install.packages(libs)

In the metrics section we introduce and work with a user-made package that supports lidR with additional functions to generate layers useful in vegetation and biodiversity mapping.

To follow along with these steps; install lidRmetrics from GitHub (not available on CRAN), this requires the devtools package

if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

devtools::install_github("ptompalski/lidRmetrics")

Datasets

We will be working with a sample ALS dataset openly available for Canton Zürich flown in spring 2014.

The raw data has been thinned to a uniform density (20 points/m2) to speed up processing.

Estimated schedule

  • Introduction to Lidar and lidR (09:00)
  • Reading LAS and LAZ files (09:10)
  • Point Classification and filtering (9:15)
  • Digital Terrain Models and Height Normalization (9:25)
  • Canopy Height Models (9:35)
  • Lidar Summary Metrics (9:50)
  • File Collection Processing Engine (10:10)

Resources

We strongly recommend having the following resources available to you:

When working on exercises:

lidR

lidR is an R package to work with LiDAR data developed at Laval University (Québec, Canada). It was developed & continues to be maintained by Jean-Romain Roussel and was made possible between:

  • 2015 and 2018 thanks to the financial support of the AWARE project NSERC CRDPJ 462973-14; grantee Prof. Nicholas C. Coops.

  • 2018 and 2021 thanks to the financial support of the Ministère des Forêts, de la Faune et des Parcs (Québec).

  • 2021 and 2024 thanks to the financial support of Laval University.

The current release version of lidR can be found on CRAN and source code is hosted on GitHub.

Note

Note

Since 2024, the lidR package is no longer supported by Laval University, but the software will remain free and open-source. r-lidar has transitioned into a company to ensure sustainability and now offers independent services for training courses, consulting, and development. Please feel free to visit their website for more information.