Questions tagged [lidr]

lidR: Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

Filter by
Sorted by
Tagged with
2
votes
1answer
19 views

For normalizing las files in a LAScatalog, is opt_filter() only used in the processing?

I'm using opt_filter(ctg) <- "-drop_overlap -drop_z_below 0"` ctg_norm <- lasnormalize(ctg, algorithm = knnidw(k = 10, p = 2), na.rm = FALSE, use_class = c(2L, 9L)) Are overlapping and ...
2
votes
1answer
22 views

Outlier filter eliminates parts of grid when applying grid_metrics

I need to calculate metrics for a normalized and outliers filtered LAScatalog. I am using grid_metrics from the lidRpackage in R. The code for filtering outliers is based in this vignette and, ...
1
vote
1answer
30 views

Configuring lascatalog to clip and export using a shapefile

I used the following commands as mentioned in the answer here ctg = readLAScatalog(...) p = read.table(...) opt_output_file <- "/folder/AOI_{Id_placett}" aois = lasclipCircle(ctg, p$x, p$y, ...
1
vote
1answer
26 views

Using grid_terrain on a LAScatalog, when the first tile (chunk) has no ground points

I am getting an error of "r: No ground points found. Impossible to compute a DTM." when running grid_terrain on a catalog. I think it is because my first tile is all water. Is there an option in ...
1
vote
1answer
51 views

Eliminating outliers from a normalized LAS file and output as another LAS file

I need to normalize, eliminate outliers and calculate metrics for a big number of .LAS data of a large area by using as much possible the package LidR. The problem comes when I try to run this part of ...
2
votes
1answer
39 views

Keeping name of metrics as band names when using grid_metrics (lidR)

When executing grid_metrics for a normalized LAScatalog the final results are GTiff files where each band corresponds to a metric. The problem is that the band names are "band 01", "band 02", "band 03"...
0
votes
1answer
38 views

Clipping multiple AOIs from a lascatalog using a dataframe [closed]

I'm tryin to clip multiple AOIs from a Lascatalog using a dataframe containing centres and radii of various plots. I can probably loop through the data frame and use lasclipCircle() to clip each plot ...
2
votes
0answers
33 views

lidR:::catalog_laxindex() - “largest interval gap increased to…” logged

Often when running lidR:::catalog_laxindex() on a catalog of tiles I'm seeing the following log messages: largest interval gap increased to 1554 largest interval gap increased to 3802 largest ...
3
votes
1answer
62 views

Difficulty using lasfilter (lidR) on an unclassified dataset

I have two .las datasets; one has been pre-processed but has limited spatial coverage and the other is the raw data with full coverage. My analysis only requires points between 10 and 40 m, hence I ...
1
vote
1answer
41 views

Error with 0 point layer in lidR [closed]

I have LiDAR point cloud from 26 X 1 ha forest plots. I am trying to calculate roughness index for different vegetation layers in each plot with following code using lidR package. files <- list....
4
votes
2answers
89 views

Overlapping LAS tiles

I have a las catalog with overlapping tiles. LidR warns me of this, and I'm wondering how concerned I should be. The tiles are in las version 1.2 with point record format 1. None of the points are ...
5
votes
1answer
121 views

Unusual polygon shapes when using tree_hulls?

The following script uses lidR to segment trees and output tree hulls (i.e. polygons representing individual tree canopies). Input data are a directory of laz files and a catalog is used to manage the ...
2
votes
1answer
23 views

lidR - Bad scan angle

When reading a las file I'm getting the following error: > readLAS("/tmp/chunk89/u_6300085100_2015.las") Error: Invalid data: ScanAngle greater than -180 degrees. In addition: Warning messages: 1: ...
1
vote
1answer
30 views

lidR - lasnormalize error handling

When normalizing a lasCatalog, the processing stops early with the following error: An error occurred when processing the chunk 22. Try to load this chunk with: chunk <- readRDS("/tmp/RtmpdcuTUO/...
1
vote
0answers
24 views

grid_canopy failed to create vrt with catalog

I use this command but it failed to create the vrt file : chm <- grid_canopy(ctg, 1, pitfree(c(0,2,5,10,15), c(0,1), subcircle = 0.2)) it is possible to add attribute to non create the vrt file ...
2
votes
1answer
42 views

Find optimal chunk size using opt_chunk_size() in lidR catalog?

Is there a way to find the optimal chunk size using opt_chunk_size() when using a lidR catalog? I seem to always randomly choose integer values until the program quits throwing errors at me. For ...
2
votes
1answer
38 views

Remove buffer in catalog_apply()?

I am using catalog_apply() to normalize las points using lasnormalize() and segment individual trees using lastrees(). This is modified from the catalog_apply() lidR documentation (p.10): library(...
2
votes
0answers
17 views

grid_canopy with overwrite=TRUE [duplicate]

When I use this command : > chm <- grid_canopy(gro, 1, pitfree(c(0,2,5,10,15), c(0,1), subcircle = 0.2)) Processing [-------------------------------------------] 0% (1/341) eta: 8mError: ...
3
votes
1answer
41 views

Creating a 3D voxel plot with LAD values in lidR

I am interested in the vertical distribution of the leaf area density (LAD) in my plot. That is why I am seeking to create voxels that represent LAD. I've been trying to achieve this with the ...
2
votes
1answer
38 views

LASCatalog - Inconsistent number of VLR

I have a LASCatalog that is producing some funky outputs so I ran a lascheck() on it. The output tells me that catalog has inconsistent number of VLR, but what does this mean? I know that variable ...
3
votes
1answer
64 views

How to deal with minus values on canopy height model?

I created a canopy height model (from lidar data) using lidR package and wanted to check it on Arcmap. I see there are minus values on canopy height models like -0.246219, -0.0302621. How can I deal ...
0
votes
1answer
26 views

Create a unique raster from a grid_terrain function from LASCatalog files

When you use grid_terrain function in lidR with a catalog, the result is a virtual raster mosaic is returned (see gdalbuildvrt). But when i clic on (gdalbuildvrt) in pdf vignette, nothing is under the ...
0
votes
0answers
32 views

lidR grid_density report

When you use d1 <- grid_density(las, res=5) and d2 <- grid_density(las, res=10) d1 is a raster when each cell is the density per 5x5=25 square meters or density in 1 square meters ? d2 is a ...
0
votes
1answer
27 views

How to create a catalog from LAS file in a directory with filter [closed]

With lidR package, how can I create a catalog with a filter keep_first for example?
2
votes
1answer
39 views

Apply a function to a catalog

I wrote a specific function to calculte metrics on a catalog but this function (myMetrics) work with a LAS file but don't work with a catalog? myMetrics = function(las, ...) { UseMethod("myMetrics",...
2
votes
1answer
48 views

Ignoring buffer files in processing

I'm wondering if it is possible to include some las files in a LAScatalog only for the purpose of providing a buffer to other las files. For example, I may only want to normalize 2 las files and use ...
1
vote
0answers
53 views

Calculating roughness index of multiple LAZ files with lidR

How do I calculate a surface roughness index of multiple lidar point clouds with lidR rumple_index? library(lidR) files <- list.files(path= "/pathToFiles", pattern= "*.laz", full.names = TRUE, ...
1
vote
1answer
76 views

Using function lasdetectshape of lidR

I would like to try "lasdetectshape" in lidR package to detect line pattern objects in my point cloud. library(lidR) las <- readLAS("9a-1.las", select = 'xyzicnrRGB') las <- lasdetectshape(las,...
4
votes
2answers
93 views

Why are .las file sizes inflated when read using package 'lidR' via Rstudio?

I frequently use the package 'lidR' to do forest point cloud analysis and the package functions OK, just I noticed that every time I load in point clouds using Rstudio, the file sizes seem to be much ...
5
votes
1answer
50 views

Reading remote LASCatalog

Would it be possible to read in a LASCatalog from a URL or vector of URLs? It is not possible with the standard function, readLASCatalog(). The benefit would be that you don't need to download all ...
2
votes
1answer
128 views

Extracting (big) rocks from LiDAR data

I have a .las file and want to show the outline of the big rocks located in this area. So far I have done the following: Obtain a ground model from the .las file including the rocks. Calculate ...
3
votes
1answer
94 views

CHM pitfree error : “Not a matrix”

I use the pitfree algorithm to create the CHM of 89 .LAS files. chm = grid_canopy(lasnorm, 0.5, pitfree(thresholds = c(0,2,5,10,15,20), subcircle = 0.2)) In the entire code, I go trough each files ...
3
votes
1answer
69 views

Classify point cloud from land cover raster values with lidR in R

I'm working with the R package lidR to process point clouds. I have a raster with 4 coarse land cover classes and the corresponding tile with the LiDAR data in las format (both in the same ...
2
votes
1answer
68 views

lasnormalize() is creating large negative values?

I am trying to generate a normalized height values for a catalog of las tiles. I first generated a dtm using: dtm = grid_terrain(ctg, knnidw(k=5)) Then, I normalize the values using: normalized = ...
3
votes
1answer
53 views

Filtering data with more than 2 criteria in lidR

I am just wondering whether lasfilter() is able to filter the las data with more than two criteria such as z value between 5 and 10 m and Number of point records greater than 1. I have tried the ...
3
votes
1answer
71 views

What is “degenerated ground point”?

When processing a dtm from lidR::grid_terrain() I'm seeing several warnings that say: There were 4 degenerated ground points. Some X Y Z coordinates were repeated. They were removed. What is a ...
3
votes
1answer
161 views

Rescaling LAS file with lidR package in R?

I am trying to process a large .las file received, which appears to have been scaled in non-standard ways for some reason (likely data transfer portability). The scales between x, y, z are different ...
3
votes
2answers
125 views

Calculation of density metric of 0.75 height quantile based on Airborne LiDAR Scanning point cloud data by lidR package [closed]

This is a piece of code that I wrote: metrics<-function(z){Q75=quantile(z,probs=c(0.75)) aboveq75=sum(z>Q75) dh75=aboveq75/length(z) return(dh75)} DH75<-grid_metrics(lid,~...
2
votes
1answer
51 views

lidR: no slot of name “header” for this object of class “LAScatalog” [duplicate]

edit: This question does share an answer with an existing question, and the problem is the same: lastrees() does not work on LAScatalogs. However, I'm going to leave this question up, because I think ...
2
votes
2answers
68 views

writeLAS writes corrupted file: 'end-of-file' after 10468 of 10474 points

I am seeing strange write behavior with lidR. The outputs from lidR are compressed to fall on a single line. I vaguely recall discussing this with JR before, but cannot recall a solution. #ok las0=...
4
votes
0answers
80 views

Maintaining extra data for .laz for use in R and Python?

I am working on releasing a benchmark dataset for trees in RGB + Lidar and I'd like the format to match the most common use cases and packages. I had been intending on proving a tree index using the ...
2
votes
1answer
88 views

Export raster of CHM from lidR

I would like to use lidR to produce canopy height rasters. I was following along in the 'rasterizing perfect CHM' user guide and now I'm wondering how to export this raster to a GeoTiff or .img. In ...
4
votes
1answer
47 views

Using lidR to count number of pulse returns at different intervals?

I am trying to get the number of pulse at different height interval. I have used the lidR package to do this before with the code below but it seems that recent update in the package breaks my code. ...
2
votes
1answer
116 views

Configuring lidR catalog to overwrite raster output (with different extension)?

I have a small issue with configuring the lidR package for parametrizing the extracted raster files with grid_metrics() function. My question is how to set in the catalog options that: be able to ...
4
votes
2answers
254 views

Filtering above ground LiDAR points using a catalog in lidR?

I am analyzing LiDAR data collected two separate years- 2007 and 2015. My analysis is centered around changes in vegetation during this time period. The ultimate goal is to thin the data from the 2015 ...
4
votes
1answer
183 views

How to 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
42 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
82 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
55 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
153 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 ...