Questions tagged [lidr]

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

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

Export classification LiDAR to raster

I'd like to export the LiDAR data according to their classification in a georeferenced raster format. Something that look like that: Here is the code that I tested to retrieve the classification: ...
1
vote
1answer
32 views

LiDAR 3D modeling using package rayshader and LAS file in R

The rayshader package in R allows beautiful 3D modeling in R. Now I was trying to first try and overlay a LAS file on top of a base-map which is a Rayshader array object. I was trying %>% to link ...
2
votes
1answer
24 views

Adding RGB attributes to voxel

How can I add the RGB attributes to a voxel object? The idea is to give RGB to the colorargument inside the plot function in lidR. And still have the attribute Z as the legend in the RGLwindow. The ...
1
vote
1answer
59 views

lidR delineate crown spatial polygon error

While using the delineate_crown function to delineate crowns, I get a spatial polygon error. How can this be fixed? # Bring in the ALS file TP1 = readLAS("~/Sample.las") # Then, normalize ...
1
vote
2answers
44 views

Add voxel attributes to LAS point cloud

I would like to add data from voxels to a point cloud. Imagine I calculated some voxel statistics with voxel_metrics(), for example: voxels <- voxel_metrics(las, length(X), res=0.1, all_voxels=TRUE)...
1
vote
1answer
21 views

Is the grid_terrain resolution in the units of the point cloud?

My las tiles are all in a coordinate system that uses US feet, so if the res parameter for grid_terrain() is set to 1, is the output 1-ft resolution? I figured this is the case, but my professor ...
-1
votes
2answers
69 views

Alternatives to LAStools lasthin?

I have a classified LAS file that I would like to further filter the ground points to only include the lowest z values based on a variety of grid sizes. Is there an alternative tool available that ...
1
vote
1answer
20 views

Can catalog_apply output a LAScatalog?

I am trying to use catalog_apply on a LAScatalog of 151 las tiles for my research. I have experimented with a catalog of 10 of these tiles, and with automerge = TRUE, the catalog_apply returns a huge ...
1
vote
1answer
18 views

lidR: center chunks when retiling

I want to retile big TLS files into quite small chunks of maximum 20 m x 20 m size. I have to normalize the point cloud, thus I need to classify the points and create a DTM for each tile. For this ...
0
votes
0answers
25 views

leafR error: no applicable method for 'readLAS' applied to an object of class "c('LAS', 'Spatial')

First, I read a LAS file into R using the readLAS() function from the lidR package: test_las <-readLAS("C:/Users/LAS files/file.las") I am now attempting to use functions from the leafR ...
6
votes
1answer
87 views

Calculating grid_metrics() in a loop, using column name within variable

I want to calculate grid_metrics() for several fields of my point cloud, using several functions. I want to perform this in loops to make my code look cleaner. Basically I want this: # loop through ...
2
votes
1answer
37 views

R lidR package grid_terrain() giving weird plot

I am working on the pre and post lidar earthquake data from Kumamoto, Japan. I would like to generate a DTM with the grid_terrain(pre_online, res = 1, algorithm = knnidw(k = 10L, p = 0.5)) function in ...
4
votes
1answer
75 views

Get eigenvalues of large point cloud using lidR

I have some very big TLS point clouds (up to 400 million points) and want to assign the eigenvalues to each point in order to later calculate geometric features like planarity or sphericity. I use R ...
1
vote
1answer
40 views

Crown area calculation with lidR::.stdmetrics differs from raster::area

I found out that tree crowns delineation using lidR::.stdmetrics calculates an area that is different from the area calculated by raster::area() or QGIS with the field calculator $area function. The ...
2
votes
1answer
40 views

Problem accessing EVLR slot in LASheader with lidR version 3.1.2

I'm using lidR 3.1.2. This problem has been occurring since very recently with the following error Error in eval(call("@", object, slot)) : no slot of name "EVLR" for this ...
0
votes
1answer
57 views

Point cloud not normalized, how do you normalize with lidR? [closed]

I am using terrestrial LiDAR data, I ran the las_check() function on a file. I get check marks and everything is good until the normalization in the preprocessing. Is there an R code to do the ...
1
vote
2answers
54 views

Remove NAs returned from grid_terrain()

I have several tiles in a catalog covering bays along the shore. There are some hits in the water but they are sparse. Ideally I think I should use the is_concave = TRUE as an option in grid_terrain(),...
2
votes
1answer
55 views

Creating Crown Maps from Catalog using lidR

I have a large catalog and I'd like to create crown maps for the entire catalog or a portion of the catalog. I've been successful at creating crown maps from single LAZ files by editing/running the ...
1
vote
1answer
45 views

Creating Catalog Subset using lidR

I have a catalog of just over 3000 LAZ files that I want to split into regions using clip_rectangle(). The total catalog size is 60GB. My PC has 64GB of RAM but I get an error that lidR is unable to ...
2
votes
1answer
42 views

Is it possible to create a LASCatalog with lidR that reference LAS files in multiple directories?

As new or updated LAS data is received, I would like to be able to integrate that into the surrounding data of the area (for normalized data, CHMs, etc. for example). I.e. I want to insert "...
1
vote
1answer
39 views

Error when using user-defined function on LAScatalog in parallel

Using lidR 3.1.3, I made a user-defined function for catalog_apply() to process a LAScatalog following this, but a it raises the following error : Erreur : pas de méthode pour 'filter_poly' ...
1
vote
1answer
42 views

Cut points falling in a polygon out of the point cloud

Using lidR 3.1.3, is it possible to classify points inside polygons shapefile for a LASCatalog, something like the previous lasclassify() function. I'm looking for a equivalent of this PDAL method. ...
2
votes
1answer
56 views

Converting LAS point cloud from feet to meters in R

Building off of a previous question: Clean way to convert from US feet to meters with lidR - LiDAR point cloud I am working with the USGS LiDAR point cloud data and am still having this rescaling or ...
1
vote
1answer
28 views

Can lidR output date/time of outputs from readLAScatalog into an index polygon shapefile?

I would like to create a tiled index for extents of processed (e.g. normalized) LAS files that include date and time of processing. This is because we sometimes receive replacement tiles, and I need ...
2
votes
1answer
74 views

Reading CRS using lidR

I have a similar issue that reported here: R lidR does not read the CRS of my las file. lidR cannot read the CRS while lasinfo from lastools can. readLAS("...
1
vote
1answer
36 views

How to create a lowest function for decimate_points() using lidR

How do I create a custom algorithm for decimate_points() in lidR analogous to the highest() algorithm but that selects the lowest points? decimate_points(las, lowest(2)) I know that lidR allows to ...
1
vote
1answer
40 views

How -thin_with_grid works?

I'm curious about how -thin_with_grid is actually performing thinning tasks within lidR. Which point is selected? One point within the grid is randomly sampled? Is it possible to select for example ...
5
votes
1answer
119 views

Computing the density for each layer with lidR

I am trying to perform a 3D profile index as a function. For this, I need to slice the layers and calculate the point density for each sliced layer. I write a for loop; The problem is density=...
2
votes
1answer
64 views

lidR Vegetation Classification

I'm new to R and to lidR. I have LAS files that are already ground classified and I'm attempting to use the method below to classify the vegetation and then write a new LAS file retaining the ground ...
2
votes
1answer
39 views

Is it possible to return 2 objects from a function when running catalog_apply?

I am normalizing a set of LAS files. In the function after normalize_height, I filter out vegetation with heights below 0 using filter_poi, and returning this as input to catalog_apply. However, I ...
2
votes
1answer
56 views

Get footprint or boundary of LIDAR data

I am using the lidR package in R to manage my ALS data. I was having problems generating DTMs on the edge files of my catalog because the tool lidR::grid_terrain() was doing some interpolation between ...
3
votes
1answer
88 views

How to filter heights using LAScatalog in lidR

I would like to filter the points that are used in a canopy height model. In particular I would like filter out any points whose height is over 200 feet. I've tried the code below but when I plot the ...
3
votes
1answer
56 views

error running readLAS() in lidR: 'new_proj_and_gdal' is not an exported object from 'namespace:rgdal'

I've just updated lidR to 3.1.1 and am now unable to load a .las file using readLAS(): las <- lidR::readLAS(paste(sfm_dir,"/","...
2
votes
1answer
24 views

Shrinking coordinates of LAS file to fit in [0,1] using lidR

I normalised a LAS file's coordinates so that XYZ all range between 0 and 1. Shift_Vox_X_ALS <- min(LAS_Vox_Test@data$X) Shift_Vox_Y_ALS <- min(LAS_Vox_Test@data$Y) Shift_Vox_Z_ALS <- min(...
0
votes
1answer
39 views

Converting an LAS object back to a LAS files (.las) using the lidR R package [closed]

I'm using the R package lidR to classify noise in a LiDAR dataset, but I would like to save the final LAS object as a LAS file to open it on another software. How can I accomplish that? Note that I'm ...
2
votes
1answer
43 views

Overlapping LAS tiles and edge artifacts

I've read the Overlapping LAS tiles post, but it doesn't pertain to the following situation. I'm trying to process a las catalog where I clip the catalog at specific plot locations with a 30 m radius. ...
1
vote
1answer
30 views

Lasinfo like task with lascatalog lidR

I would like to have an idea about the classification of point clouds loaded in a LAScatalog with lidR. With a las file, I can do this way: library(lidR) LASfile <- system.file("extdata", ...
3
votes
1answer
50 views

Merge all tiles from lascatalog?

Everything is in the title, I would like to save all the tiles from a LAScatalog in one las file. I don't want to store all the tiles in one folder, just one file (because I found it more convenient ...
2
votes
1answer
44 views

Reprojecting a lascatalog

I'm using the approach described here to change LiDAR point cloud projection in R: Can I re-project an LAS file in LidR But, what about lidR catalog reprojection? If I used the same reproducible ...
0
votes
0answers
38 views

R lidR stdmetrics_z

When using stdmetrics_z in the R package lidR, it produces 36 bands of metrics. I am unable to find the definition of each of these bands (metrics). In the help it says to view the wiki page but there ...
2
votes
1answer
56 views

R lidR CRS as WKT

I would like to solve the warning I receive when I read in a set of laz files using readLASCatalog in the R package lidR. When I use this code I receive this warning: library(lidR) ctg_test <- ...
2
votes
1answer
121 views

R lidR does not read the CRS of my las file

I have a LAS 1.4 file that I can read in lidR but the CRS is not read: las = readLAS("LD31201353.las") las #> class : LAS (v1.4 format 6) #> memory : 172.5 Mb #> ...
1
vote
1answer
126 views

R spTransform() in lidR - error: non quantizable value

I am trying to reproject a las file in lidR (doawnload file here) from epsg:2232 to epsg:32613, and get the following error message after about 3 seconds of processing: las <- readLAS("...
0
votes
1answer
41 views

How is the pground metric (to measure percent ground hits) implemented into a function for grid_metrics in lidR?

I'm having difficulty with the method to obtain the percentage of points classified as ground using grid_metrics(). I would like to implement pground (one metric) like stdmetrics (a set of metrics), ...
1
vote
2answers
63 views

Select a subset of lidar tiles (las files)

I have terrestrial lidar scans that were merged and tiled into 100 x 100m tiles, but they are a little too big so I re-tiled to 50x50m. However, a lot of tiles at the edge of the study area are very ...
0
votes
1answer
62 views

Shift or replace_z values from ALS LiDAR scans

I have ALS LiDAR scans that I merged into a single file and classified ground points. I'm trying to 're-scale' the Z/height values but without actually normalizing them.. What I'd like to do re-scale ...
1
vote
1answer
87 views

LASlib internal error - reading las file with lidR

Should I assume that the following error occurs because the file is corrupt? Is there any way I can get more information out of this file? bad_las <- readLAS("~/Downloads/3102_309374.las")...
2
votes
0answers
54 views

Error: User's function does not return NULL for empty chunks

I am trying to create a user-defined defined function for a LAScatalog object in R using the lidR package and no matter which function I create, if opt_wall_to_wall is set to TRUE, the code returns ...
2
votes
1answer
34 views

How do I reread a catalog after applying a spatial filter in readlasCatalog, to represent the reduced set of las files?

I would like to normalize a set of LAS files produced by Digital Aerial Photogrammetry (DAP) against a set of LAS files acquired by Lidar. The idea is to create the DEM raster from Lidar once and to ...
3
votes
1answer
65 views

lidR - add vegetation classification to unique trees

I have done a individual tree segmentation using lidR and the resulting LAS file now has been classified so that all points belonging to a tree have a unique treeID. So far so good! But before writing ...