Code Monkey home page Code Monkey logo

lidr's Introduction


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.

Content

  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>")
plot(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)

plot(chm)

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
plot(ctg)

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
install.packages("lidR")
  • The latest development version from github with
devtools::install_github("Jean-Romain/rlas", dependencies=TRUE)
devtools::install_github("Jean-Romain/lidR", dependencies=TRUE)

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

Changelog

See changelogs on NEW.md

lidr's People

Contributors

jean-romain avatar daveauty avatar floriandeboissieu avatar bi0m3trics avatar marcfletcher-hqp avatar

Watchers

James Cloos avatar HarryZhu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.