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

-1
votes
0answers
34 views

Detecting planting line from treetop points generated from LidR package? [on hold]

I need to identify tree planting lines in commercial eucalyptus reforestation areas. The Hough_line algorithm used to create planting lines from image patterns creates center points in the areas, and ...
3
votes
0answers
38 views

How do I use lastrees on a catalog with a function requiring a CHM raster?

I'm still fairly new to using LiDAR data and R, so please let me know if this isn't clear. I am using the lidR package to segment individual trees over a large landscape. I have been using the ...
0
votes
1answer
31 views

Does lasfilterdecimate work when homogenizing by pulse?

In R lidR package, when I run lasfilterdecimate with the homogenize option excluding use_pulse = TRUE it works, but when I include use_pulse = TRUE, it does not work. For example, the code below ...
3
votes
1answer
51 views

lidR (rlas) writeLAS changes values from Classification attribute?

I have a point cloud with extra attributes: class : LAS (LASFˇ v1.4) point format : 6 memory : 2 Gb extent :7498400, 7499200, 5779500, 5780000 (xmin, xmax, ymin, ymax) coord. ref. ...
2
votes
1answer
38 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
92 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
76 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
78 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
115 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
57 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
56 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
100 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
99 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
147 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
141 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
55 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
189 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
83 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
106 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
417 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 ...
5
votes
2answers
308 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 ...
3
votes
1answer
97 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( ...
5
votes
2answers
711 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) ...