lidR v1.6.0


Monthly downloads



Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

Airborne LiDAR (Light Detection and Ranging) interface for data manipulation and visualization. Read/write 'las' and 'laz' files, computation of metrics in area based approach, point filtering, artificial point reduction, classification from geographic data, normalization, individual tree segmentation and other manipulations.


CRAN Github licence

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 catalog of datasets, automatically extract ground inventories, process a set of tiles using multicore processing, individual tree segmentation, classify data from geographic data, and provides other tools to manipulate LiDAR data in a research and development context.

Development of the lidR package between 2015 and 2018 was made possible thanks to the financial support of the AWARE project (NSERC CRDPJ 462973-14); grantee Prof Nicholas Coops.


  1. Key features
  2. Some examples
  3. Install lidR
  4. Changelog

Key features

Some examples

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 PointCloudViewer with greater display capabilites.

las = readLAS("<file.las>")

Compute a canopy height model

lidR has several algorithms from the literature to compute canopy height models either point-to-raster based (grid_canopy) or triangulation based (grid_tincanopy). 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
th = c(0,2,5,10,15)
edge = c(0, 1.5)
chm = grid_tincanopy(las, thresholds = th, max_edge = edge)


Read and display a catalog of las files

lidR enables the user to manage, use and process a catalog of las files. The function catalog builds a LAScatalog object from a folder. The function plot displays this catalog on an interactive map using the mapview package.

ctg = catalog("<folder/>")
ctg@crs = sp::CRS("+proj=utm +zone=17")

# CRS set: will be displayed on an interactive map

From a LAScatalog object the user can (for example) extract some regions of interest (ROI) with lasclip or catalog_queries. Using a catalog for the extraction of the ROI guarantees fast and memory-efficient clipping. LAScatalog objects allow many other manipulations that are usually done with multicore processing, where possible.

Individual tree segmentation

The lastrees 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-reviwed papers. Our goal is to make published algorithms usable, testable and comparable.

las = readLAS("<file.las>")

lastrees(las, algorithm = "li2012")

col = random.colors(200)
plot(las, color = "treeID", colorPalette = col)

Other tools

lidR has many other tools and is a continuouly improved package. If it does not exist in lidR please ask us for a new feature, and depending on the feasability we will be glad to implement your requested feature.

Install lidR

  • The latest released version from CRAN with
  • The latest stable development version from github with
devtools::install_github("Jean-Romain/rlas", dependencies=TRUE)
devtools::install_github("Jean-Romain/lidR", dependencies=TRUE)
  • The latest unstable development version from github with
devtools::install_github("Jean-Romain/rlas", dependencies=TRUE, ref="devel")
devtools::install_github("Jean-Romain/lidR", dependencies=TRUE, ref="devel")

To install the package from github make sure you have a working development environment.

  • Windows: Install Rtools.exe.
  • Mac: Install Xcode from the Mac App Store.
  • Linux: Install the R development package, usually called r-devel or r-base-dev
  • The latest stable development version from github with


See changelogs on

Functions in lidR

Name Description
LAS-class An S4 class to represent the data read in a .las or .laz file
as.lasmetrics Set the class 'lasmetrics' to a data.frame or a data.table
as.list.LASheader Transform to a list
LAS Create a LAS object
catalog_queries Extract LiDAR data based on a set of coordinates
entropy Normalized Shannon diversity index
catalog_reshape Reshape (retile) a catalog
LAD Leaf area density
grid_metrics3d Voxelize the space and compute metrics for each voxel
LAScatalog-class An S4 class to represent a set of .las or .laz files
LAScluster-class An S4 class to represent an arbitrary region in the catalog.
-,LAS,RasterLayer-method Convenient operator to lasnormalize
catalog_index Retrieve the files containing ROIs
catalog Build a catalog of las tiles/files
extent,LAS-method Extent
catalog_options Options Settings for the catalog tools (deprecated)
catalog_apply Apply a user-defined function to an entire catalog in a continuous way
grid_tincanopy Canopy height model based on a triangulation.
lastrees_li2 Individual tree segmentation
lastrees_li Individual tree segmentation (deprecated)
lasadddata Add data into a las object
grid_density Map the pulse or point density
grid_catalog Apply a grid function over a catalog
gap_fraction_profile Gap fraction profile
lassmooth Smooth a point cloud
grid_terrain Digital Terrain Model
grid_canopy Canopy surface model
grid_hexametrics Compute metrics for hexagonal cells
lasclassify Classify LiDAR points from source data
grid_metrics Rasterize the space and compute metrics for each cell
lassnags Snag classification
lasground Classify points as ground or not ground
plot.LAS Plot LiDAR data
lidrpalettes Palettes
plot.LAScatalog Plot a LAScatalog object
lasmetrics Compute metrics for a cloud of points
lidR-deprecated Deprecated function(s) in the lidR package
plot.lashexametrics Plot an object of class lashexametrics in 2D
tree_detection Tree top detection based on local maxima filters
tree_hulls Compute the hull of each tree.
lidr_options Options Settings for the lidR package
lasfilterdecimate Thin LiDAR data
lasclip Clip LiDAR points
VCI Vertical Complexity Index
stdmetrics Predefined standard metrics functions
lasfilters Predefined filters
area Surface covered by a LAS object or by a LAScatalog.
as.raster.lasmetrics Transform a lasmetrics object into a spatial RasterLayer object
as.spatial Transform a lidR object into sp object
catalog_retile Retile a catalog
lasnormalize Subtract digital terrain model
lasroi Select a region of interest interactively
laspulse Retrieve individual pulses
catalog_select Select LAS files interactively
lascolor Compute the color from RGB fields
lasscanline Retrieve individual scanline
lastrees Individual tree segmentation
rumple_index Rumple index of roughness
lasfilter Return points with matching conditions
set.colors Automatic colorization
lastrees_dalponte Individual tree segmentation
plot3d Plot a wireframe of a RasterLayer or a lasmetrics object
readLAS Read .las or .laz files
tree_metrics Compute metrics for each tree
util_makeZhangParam Parameters for progressive morphological filter
lasfiltersurfacepoints Filter the surface points
summary.LAS LiDAR data summary
lasflightline Retrieve individual flightlines
lastrees_silva Individual tree segmentation
lastrees_watershed Individual tree segmentation
plot.lasmetrics Plot an object of class lasmetrics in 2D
plot.lasmetrics3d Plot voxelized LiDAR data
writeLAS Write a las or laz file
LASheader Create a LASheader object
LASheader-class An S4 class to represent the header read in a .las or .laz file
No Results!

Last month downloads


Type Package
Date 2018-07-25
License GPL-3
LazyData true
RoxygenNote 6.0.1
LinkingTo Rcpp
Encoding UTF-8
ByteCompile true
Collate 'RcppExports.R' 'catalog_apply.r' 'catalog_fakerun.r' 'catalog_index.r' 'catalog_laxindex.r' 'catalog_makecluster.r' 'catalog_query.r' 'catalog_retile.r' 'catalog_select.r' 'class-lasheader.r' 'class-las.r' 'class-lascatalog.r' 'class-lascluster.r' 'clusters_apply.r' 'constant.R' 'deprecated.r' 'grid_canopy.r' 'grid_catalog.r' 'grid_density.r' 'grid_hexametrics.r' 'grid_metrics.r' 'grid_metrics3d.r' 'grid_terrain.r' 'grid_tincanopy.r' 'lasaggreagte.r' 'lasclassify.r' 'lasclip.r' 'lascolor.r' 'lasfilter.r' 'lasfilterdecimate.r' 'lasfiltersurfacepoints.r' 'lasground.r' 'lasindentify.r' 'lasmetrics.r' 'lasnormalize.r' 'lasroi.r' 'lassmooth.r' 'lassnags.r' 'lastrees.r' 'lastrees_dalponte.r' 'lastrees_li.r' 'lastrees_li2.r' 'lastrees_silva.r' 'lastrees_watershed.r' 'lasupdateheader.r' 'metrics.r' 'metrics_canopy_roughness.r' 'options.r' 'plot.catalog.r' 'plot.las.r' 'plot.lashexametrics.r' 'plot.lasmetrics.r' 'plot.lasmetrics3d.r' 'plot3d.r' 'readLAS.r' 'stopif.r' 'subcircled.r' 'tree_detection.r' 'tree_hulls.r' 'tree_metrics.r' 'utils_colors.r' 'utils_geometry.r' 'utils_interpolations.r' 'utils_misc.r' 'utils_projection.r' 'utils_spatial.r' 'utils_typecast.r' 'writeLAS.r' 'zzz.r'
NeedsCompilation yes
Packaged 2018-07-26 19:09:05 UTC; jr
Repository CRAN
Date/Publication 2018-07-26 19:40:05 UTC

Include our badge in your README