Questions tagged [lidr]

lidR: Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

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

Tree Segmentation using lidR

In rLiDAR, you can segment trees by using CHMs ASCIIs produced by Fusion. Can the same be done in lidR? I know in lidR you have to use the .laz file for tree segmentation: LASfile <- system.file(&...
1
vote
1answer
17 views

Nomalization error “Interpolation of X points outside the convex hull”

Recently I had to update my version of lidR from 2.3 to 3.0 and since then, the script I had for normalizing my files can not finish the process not even if I indicate opt_stop_early()<-FALSE. The ...
4
votes
2answers
62 views

How do I keep the unique segmented treeID when exporting the .las file

I want to export a .las file of segmented trees with the treeID column into ArcPro, but when I export the file the treeID column is not selectable and I really want the separate colours for the ...
3
votes
1answer
32 views

lidR: Save LAS files from a clip_roi list

I have clipped a point cloud with a shapefile containing multiple polygons, using clip_roi() function. The result is a list of LAS files. However, when I try to loop through the list and save each ...
2
votes
1answer
25 views

How does gridmetrics handle IF condition in user defined functions?

I noticed a kind of "inconsistency" in the values returned from two user-defined functions. I tested on a tile of 200mx200m to return a raster of pixel size 50m (16 pixels) In the following ...
1
vote
1answer
32 views

How can I scale LiDAR intensity values to 8-bit, in order to apply the Wing2015 snag algorithm using segment_snags in lidR?

I'm trying to identify snags using LiDAR stored in las format. The Wing 2015 algorithm used in segment_snags requires the values be in the range from 0 to 255. Is it possible to edit and scale ...
3
votes
1answer
83 views

Why is normalize_height() function aborting in lidR?

I'm trying to run normalize_height() on 328 las files. Maybe or maybe not relevant: I'm not running using LAScatalog because I couldn't get that to run at all. Anyhow, I'm running using a parallelized ...
1
vote
1answer
27 views

How to exclude bounding boxes of plots in lascatalog

I have 96 1 ha (200m by 50 m) plots that I collected TLS data (each file separate). Most of the plots are close to each other and therefore they have overlapping bounding boxes (point clouds don't ...
1
vote
2answers
44 views

Dropping points based on class number in lidR

I have a TLS point cloud which were classified into ground (class 2) and unclassified (class 1). lasinfo (190812) report for 'infile.laz' reporting all LAS header entries: file signature: ...
1
vote
1answer
28 views

Export more than one object with catalog_apply

I am looking for advice on how to export more than one type of object when using catalog_apply() from the lidR package. For example, in the code below the custom function fn_bufferTile() computes a ...
2
votes
1answer
26 views

Horizontally slicing point cloud into a cylinder

I have some point clouds from mobile terrestrial laser scanning of circular sampling plots in woodland environments. I am interested in studying the structural complexity of the woodland understorey. ...
-1
votes
1answer
59 views

Creating the delineate_crown function using lidR package in R?

I can't seem to create a delineate_crown() function using the lidR package. I am using the example code given at page 33 of lidR.pdf to get familiar with the function. Furthermore, I tried playing ...
3
votes
2answers
92 views

Individual tree segmentation workflow with lidR package

I am seeking advice on how to build a workflow for individual tree segmentation (ITS) processing with the lidR package using catalog objects. My current ITS workflow is parallel and leverages the ...
4
votes
1answer
72 views

Lasclip produces overlap with non-overlapping shapefiles

Using a set of non-overlapping polygons (sf object) to clip a LAScatalog or LAS object creates an overlapping set of LAS files. I think the overlap is due to the use of the bounding box of the shapes ...
1
vote
1answer
42 views

How do I get R to recognize a buffer around a las file?

I'm trying to clip from a catalog using a shapefile. The file is huge, so I've divided it into two (ctgw1 and ctgw2). The final radius should be 47 (the ctg is in feet) and I'm trying to set a buffer ...
3
votes
1answer
79 views

Rescaling and reoffsetting a point cloud with lidR?

I'm trying to analyse a a 3 x 3 metres scan derived from terrestrial photogrammetry (i.e. local coordinates, with 0,0 in the centre of the point cloud) to obtain a DSM. Importing the file in lidR, I ...
0
votes
0answers
38 views

How to efficiently allocate memory for big raster file in lidR v2.2.4?

I am intended to find trees from a CHM created in agisoft with total raster size of 1.2GB with this following code: library(lidR) library(future) # set to use 8 cores with future plan(multisession, ...
4
votes
1answer
80 views

Partially processing a catalog with an extent in lidR

I am using lidR to create a DEM of a very large area (over 1 million hectares). I have already processed a portion of this area. I would like to be able to read the entire LAScatalog so that the ...
0
votes
1answer
37 views

Error in for loop not recognizing writeLAS command

I am currently trying to run a for loop in R that creates las files from a vector of 530 objects (EABplots). I have downloaded lidR, rLiDAR, and the relevant packages that come along with them (sp, ...
2
votes
1answer
91 views

LAScatalog and shapefile fail to line up in lidR

I am currently trying to read in a catalog of las files (statewide 10TB) and extract around 500 plots from a shapefile of central points. The shapefile reads in correctly, and I have checked it in ...
1
vote
1answer
39 views

How can I have the centroid of each chunk of a catalog?

I use lidR package. I have a catalog and I want to save as a shapefile the centroid of each chunk make with opt_chunk_size of a catalog ?
2
votes
1answer
35 views

Intensity Range Correction - How to choose a power value?

I'm using lasrangecorrection from the lidR package to correct my Intensity values for effects of distance from sensor to target. I'm wondering how to best choose the f parameter (exponent for ratio of ...
1
vote
1answer
90 views

Calculate volume of a building using LiDAR data

I would like to use 3D spatial metrics that introduced in the paper titled "Lidar and VHRS data for assessing living quality in cities - An approach based on 3D spatial indices". I have a lidar ...
1
vote
1answer
29 views

Selection of Standard Range for LiDAR Intensity Range Correction

When correcting LiDAR intensity values for the effects of range (distance from sensor to target) many methods, including the one supplied by the lidR package (https://rdrr.io/cran/lidR/man/...
1
vote
1answer
53 views

lidR: Error in .bboxCoords(coords) : nrow(coords) > 0 is not TRUE

I'm using lidR to create some lidar metric rasters that match the layout of Landsat images. In the lidR documentation it says this can be done simply by using a RasterLayer instead of a resolution in ...
-1
votes
1answer
58 views

Evaluate mismatch in lidR [closed]

I'm working for a LiDAR integrator and I'm in charge of evaluating the strip adjustment algorithm we've developed. I'd like to know if it is possible to evaluate the mismatch in lidR. And if yes how ...
1
vote
1answer
78 views

Speeding-up las files processing in a chunk with buffer [closed]

My aim is to do tree segmentation from lidar data. I have 15 las files and I want to merge them before segmentation. I realized that using chunk with buffer helps to get a proper segmentation. When I ...
2
votes
1answer
56 views

Split LAS data from multi-beam sensors

I'm working with 4 different las datasets, each of which are produced by multi-beam sensors (Leica ALS70-HP and Riegl LMS 1560). In 2 of the datasets (Examples A, and C) the UserData field seems to ...
1
vote
1answer
47 views

lidR Range Correction Errors

I'm trying to use lidR to range correct the intensity values in my point cloud. I'm running into some trouble with running lasrangecorrection due to producing an unrealistic range value. The mean ...
0
votes
1answer
128 views

dimension 1 : coordinate intervals are not constant ERROR

I am calculating metrics with lidRpackage with the command grid_metrics applied to a catalog opt_chunk_buffer(ctg) <- 0 opt_chunk_size(ctg) <- 0 opt_filter(ctg) <- "-drop_z_above 50 -...
2
votes
1answer
46 views

Extract the filename from a chunk when processing a LAScatalog

I'm using the R packages lidR and TreeLS to process lidar data and I made a function that takes in a single LAS file and splits out a shapefile, it looks like this: lasfile = 'tile_1.las' las = ...
3
votes
1answer
51 views

Directional pattern in normalized LiDAR point cloud

I have used the lidR package (https://github.com/Jean-Romain/lidR) to produce a normalized point cloud. I then filter out the points tagged with the overlap bit using: opt_filter(ctg) <- "-...
2
votes
1answer
39 views

Comprehensive list of filter string options in readLAS

Is there a comprehensive list of string based filters that the lidR package supports in readLAS()? For example: filter = "-drop_z_below 0" filter = "-drop_withheld" I know there are many more ...
2
votes
1answer
44 views

How do I correctly remove the buffer using catalog_apply?

I'm applying lasnormalize with catalog_apply in lidR with opt_chunk_buffer set to 20 metres. I do not remove the buffer explicitly and the normalized las files, which are returned, include the hits ...
0
votes
0answers
25 views

Clipping LAScatalog with polygon in R

I tried variants for lasclip with R: lasclip las file with single polygon and lasclip LAScatalog with the same single las file inside the catalog. Both times I used the same single clipper polygon....
3
votes
1answer
42 views

How can detect an 'end-of-file' error, using code, when using readLAS?

While looping through my list of LAS files in a directory (I'm using readLAS to record warnings and errors for each file), at least one file gives an error message in the console window (i.e. ERROR: '...
2
votes
2answers
48 views

Increment a counter in the catalog_apply function (lidR)

following up on this question: Capture and parse output of lascheck from lidR... (while lidR 3 is in development, I thought I'd continue with a workaround.) I'm using catalog_apply to perform ...
1
vote
1answer
38 views

Adding segments3d to a view 3D from lidr

I want to add segments represent the tree of apex tree, how to add segments3d to the plot below ? library(lidR) library(rgl) LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR") ...
5
votes
1answer
52 views

Using lidR to calculate null voxels

Is it possible to return null voxels (those without any points) using voxel_metrics()? As the description is written, voxels are only returned when they contain at least one point. I am currently ...
3
votes
1answer
57 views

Capture and parse output of lascheck from lidR

To aid in quality control of a set of LAS files, I would like to write out all errors/warnings from lascheck(), for each LAS file (i.e. so not the LAScatalog implementation of lascheck(()). I'm ...
0
votes
0answers
26 views

lidR mcwatershed [duplicate]

I have a error with the last version of lidR 2.2.2 when I am running mcwatershed crowns2 = mcwatershed(chm.2,ttops_pp.2_v,th_tree = 8,ID="treeID")() Error: The mcwatershed algorithm has been removed ...
1
vote
1answer
60 views

Dealing with gap between lidar-derived tree crowns that acquired from different las tiles using ArcGIS Desktop

I used lidR package and applied simple watershed algorithm for 2 las tiles. Between the segmented crowns there is a gap around 1 meters. How can I deal with this gap? I tried to "integrate" tool ...
0
votes
0answers
48 views

Extract trees as polygon shapefile after tree segmentation

One of the ITD approaches in lidR package is introduced by Li et al. (2012). Here is the usage of this approach in lidR package, page 74: li2012(dt1 = 1.5, dt2 = 2, R = 2, Zu = 15, hmin = 2, ...
4
votes
1answer
266 views

Error: 'nrow(coords) > 0 is not TRUE'

I'm building a pretty complex function to rasterise some parameters of my point cloud using grid_metrics (lidR version 2.2.2). no_fun = function(x,y,z,cl){ require('lidR') require('dplyr') ...
0
votes
1answer
69 views

Calculate metrics LiDR

Would it be possible to calculate a density metric in height intervals as in FUSION or Lastools? e.g number of all returns between 0.2 and 3 meters/number of total returns in 1 meters cell. I'm ...
2
votes
1answer
148 views

Individual tree segmentation using R-package lidR [closed]

I have some questions about individual tree segmentation in lidR. I'm looking at using the function lastrees with algorithm watershed. My first question is how to apply it for large areas. How big ...
0
votes
1answer
71 views

Marker-controlled watershed segmentation

I am trying to do a marker-controlled watershed segmentation. lidR package is updated and mcwatershed() has been removed in the latest release. How can I apply marker-controlled segmentation? Do you ...
-1
votes
1answer
96 views

Grid_metrics fails to create grid_metrics.vrt

I need to obtain the metrics for a denoised normalized dataset. This is part of the code that I am using: ctg_denoised <- readLAScatalog("G:/NoBackUp/denoised/") opt_chunk_buffer(ctg_denoised) <...
1
vote
1answer
67 views

Subset a lascatalog point cloud within a function while calculating grid_metrics

I am trying to create subsets of a point cloud based on the ScanAngleRank and compute some metrics for each subset. Then return a stack of values(rasters) for the metric. I modified the rumple index ...
1
vote
1answer
77 views

Mymetrics LidR canopy cover

I am trying to compute my own metric using LidR. I would like to compute the canopy cover metric as (# of first returns > 2m) / (total number of first returns) The package suggested this function ...