Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lidr]

lidR: Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

2
votes
1answer
25 views

lidR lasaddextrabytes does not update header

My lidR version is 2.0.2 I am trying to add an extrabyte about treeID that I get from raster (lasmergespatial with vector is super slow). I have a problem with saving that extrabyte to LAS file. I ...
4
votes
1answer
61 views

Configuring lidR catalog to save files with same filename?

I'm trying to learn how to use the options of catalog() within the lidR package in R. I'd like to save directly the processed files, for example, using grid_terrain() function over a catalog and save ...
3
votes
1answer
70 views

Clipping a catalog with lasclipCircle returns “no point found within region of interest”

I'm trying to clip a catalog using lidR (v2.0.1) package. I've tried with lasclipCircle and lasclip. It gives me the error: no point in ROI, but when I'm viewing the shapefile using mapview (I've ...
4
votes
2answers
54 views

Removing noise from point cloud with lidR package

I have unclassified Terrestrial Laser Scanning (TLS) point cloud data which has some noise. Is there a function in the lidR package which can be used to remove noise?
3
votes
1answer
78 views

Exporting crown boundaries from tree segmentation in R?

I am using lidR package to segment my trees using lastrees directly from the points clouds. The function works fine, however I would like to export to vector file the canopy boundaries from ...
3
votes
1answer
51 views

Watershed a catalog RasterStack in place of RasterLayer in lidR?

I want to use watershed with lidR package on a catalog. I paste this command: rep <- "/home/lasfiles" new_ctg <- catalog(rep) lidR:::catalog_laxindex(new_ctg) opt_output_files(new_ctg) <- ...
2
votes
1answer
46 views

Tolerance setting in watershed segmentation(EBimage/lidR) in R

Can anyone here explain to me what the "tol" parameter in the watershed algorithm implemented in the BioConductor package EBImage (and lidR) does? I find the explanation in the EBImage help difficult ...
3
votes
1answer
84 views

Filtering (lasfilter on) huge LiDAR dataset

My dataset is about 8.3 GB after loaded into R environment by using lidR package. Some points which have return number greater than number of returns need to be removed. With a small dataset, I ...
3
votes
1answer
87 views

Interpolating LiDAR intensity images in R?

I'd like to generate 0.5 m intensity images using lidR, but the resulting raster is full of pits. Here's a reproducible example: library(lidR) LASfile <- system.file("extdata", "MixedConifer.laz", ...
3
votes
1answer
116 views

Calculating standard metrics in multiple LiDAR files with lidR 2.0

I am porting my existing code to lidR version 2.0 and would like someone to let me know if I am coding efficiently. My objective is: to process a directory of LAS files normalize las files calculate ...
1
vote
2answers
125 views

File header incorrectly reporting 0 point records in R?

I have a set of 10 LiDAR files that I'm attempting to retile and eventually use to create a Canopy Height model. I'm able to import them as a catalog, however when I go to retile my catalog, I get the ...
1
vote
1answer
48 views

Why a laz file give warning about numbers of returns, using readLAS in R

Reading a laz file with the lidR package in R I have the following warning. What does it means? las = readLAS("chmp15.laz", filter = "-drop_z_below 0") #> Warning message: #> Invalid data: 8895 ...
3
votes
1answer
117 views

Error in reading point cloud data (.las) in R?

I want to generate a DEM using a point cloud (.las) for which I tried reading it in R using rlas, lidR and rLiDAR : readLAS command and none of it seems to work. The LASfile is not being read at all....
3
votes
1answer
73 views

Constructing a function to pass to lidR::grid_metrics

I am attempting to write an R function, as part of a package, that takes a lidar tile (LAS object) and a vector of cut-points defining vertical layers, and returns a RasterStack where each layer has a ...
4
votes
1answer
87 views

Is there a difference between a CRS initiliazed from epsg code and .shp basic proj string?

Can someone enlighten me if there is a difference between initializing a CRS object using the epsg code versus just the +proj string read from a shapefile? Consider the following objects A ...
3
votes
2answers
347 views

Clipping object of class LAS with polygon shapefile using lidR?

I want to make a simple clip with my .las 3D-Pointcloud. Therefor I use the lasclip() function. Import .las: lidar <- readLAS("~/data.las") lidar gives me class : LAS (LASF v1.2) memory ...
4
votes
2answers
281 views

How to filter point cloud by flightline in R?

The lidR package in R provides a way to mark individual points in a point cloud with a flightline ID by using lasflightline(). From the documentation: Retrieve each individual flightline by ...
2
votes
1answer
91 views

How to incorporate stdmetrics in gridmetrics function?

I am attempting to feed the lidR gridmetrics function a list of metrics. I can generate the list of metrics within a function (following this example): myMetrics = function(z, i) { metrics = list( ...
4
votes
2answers
609 views

How to write the results of lidR grid_metrics to a georeferenced raster?

I'm using the lidR package to calculate LiDAR grid metrics (p.18 documentation) for forestry applications. For example, the following calculates the mean elevation within a 20m cell: library(lidR) ...