Questions tagged [lidr]

R package for Airborne LiDAR Data Manipulation and Visualization in Forestry Applications

Airborne LiDAR (Light Detection and Ranging) interface in R 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.

41 questions
1
vote
1 answer

How to write multiple filenames as a row in dataframe

I am new to R. I am trying to apply a function to several files and write a dataframe which includes all the file names as one column and corresponding "roughness" result as another column. library(lidR) files <- list.files(path= "/allfiles",…
Sher
  • 369
  • 2
  • 19
1
vote
1 answer

How to create polygon according to treeID from spatial points data frame?

I have created a spatial points data frame from .las file which has the following structure and headings. head(Rnorm@data) X Y Z gpstime Intensity ReturnNumber NumberOfReturns Classification ScanAngle pulseID treeID 1: 390385.3…
0
votes
1 answer

How to modify height value of building class within LAScatalog

I am working with a collection of classified LAZ files located over an urban area. I would like to create a canopy height model (CHM) for the urban tree extent. Filtering out and only keeping ground and tree classified points, the resulting CHM has…
kjtheron
  • 191
  • 1
  • 11
0
votes
1 answer

Custom function works only on some parent functions of another package

In my personal package I have a couple of functions that are used within the lidR package. I can't understand why the same function works if used with catalog_apply but gets an error if used with pixel_metrics. So, in the latter case, I have to load…
Nico
  • 191
  • 1
  • 6
0
votes
0 answers

Extracting metrics using the lidR::polygon_metrics function

I would like to extract a set of (x, y, z) based metrics from a lidar point cloud using the R lidR package. These metrics should be extracted for each field plot, the locations of which are in a shapefile. Each plot is represented by a 15m circular…
0
votes
0 answers

Does the function iterative closest point (ICP) exist in R?

Does an R function iterative closest point (icp) exist for use with LAS objects? I see the options morpho::icpmat() and mesheR::icp(), but these appear to use mesh3d objects instead of LAS. I was hoping to find something similar to icp from the…
fraziertj
  • 11
  • 2
0
votes
0 answers

I have a smoothed las file in R, that I chunked. When I try to make the DTM it does not work

I read in my las catalog, then chunked it using following code - dir.create(glue('{2023}/tile'), showWarnings = FALSE) opt_chunk_buffer(ctg) <- 10 opt_chunk_size(ctg) <- 100 opt_output_files(ctg) <- paste0(2023,…
0
votes
0 answers

R - Classify las using a shape

Using lidR I have LIDAR point cloud and a Shapefile. I am trying to classify a las file using several polygons that are in the .shp. Can you help me? I've try merge_spatial and classify_poi from lidR Shape Attribute table I want to have a Coolum…
0
votes
0 answers

Preserving or parsing file structure from GCP Cloud Storage in a R Server Posit Workbench Standard for GCP Instance

I am working on a project that involves a large .las file (3d point cloud). I process this file in a variety of ways using the lidr package in R. Because of the size of the file and my hardware limitations, I decided to try to give cloud computing a…
0
votes
1 answer

How to pass a list to the filter_poi function in r?

I have a list of treeID which has cloud points that are less than 100. i dont want these treeID in my lidar data. How can i pass the list to the filter_poi in the lidr library to remove these cloud points. las_i <- filter_poi(las,treeID != 2) Here…
Purple_Ad
  • 65
  • 6
0
votes
2 answers

Using "lapply" in R to create multiple raster files from folder with lidar data

How can I read all files in a folder, perform a script and create separate outputs from all files containing the original name? I have a folder with .las files and I need to create corresponding .asc files from them. My script as…
0
votes
1 answer

running a while loop to get number of points in lidar data in r

I have segmented trees in r using lidR packages. The segmented trees have an id associated with them. i want to know how many points are there in each tree. I am using while loop to get the points for each tree but i am only getting the points from…
Purple_Ad
  • 65
  • 6
0
votes
1 answer

Extract data from an object from lidar data in r

I am trying segementation of trees using lidr. I need to count how many points are segemented in each tree. i have a las variable which has an attribute treeID. Using filterpoi i can get individual tree id and see how many points are there. i want…
Purple_Ad
  • 65
  • 6
0
votes
2 answers

R rgl lidR slow rendering on Windows 11 64 bit

I am trying to manually identify/correct trees using LiDAR data (1.7 GB object) and a tree tops object via the locate_trees function. Part of the problem is: Rgl is rendering very slow even though the 4 GB Nvidia 3050 should be able to handle…
Ed_Gravy
  • 1,841
  • 2
  • 11
  • 34
0
votes
0 answers

lidR package (4.0.1) - rumple_index error and 'NA' returned

I have used this code many times over the past year and am now getting an odd error when I try to calculate rumple index. Here is a simplified version of the code. library(lidR) lidar <-readALSLAS("F:/FSF_lidR/Plot_NLAS/FSF_1_N.las", filter =…
MEW
  • 1
  • 1