Error occured in "Clip_roi" #688
Replies: 3 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
-
Please provide a minimal reproducible exemple |
Beta Was this translation helpful? Give feedback.
-
Oh, I am sorry, Yes you are right. THe error is clearly related to the "Clip_roi". To check this, I tested with/without the codes for filtering, normalized_hiehgt, and raterize_terrain. Therefore, the codes are ###READ PACKAGES
library(lidR)
###DEFINE YOUR WORKING DIRECTORY
setwd("E:/Lidar_2022/R/trials")
las_cat<-readLAScatalog("E:/Lidar_2022/R/trials")
#Read shapefile
Buffer <- shapefile("E:/Lidar_2022/Data/Boundary/Talladega_Field_Buffer.shp")
#Clip with buffer
opt_output_files(las_cat) <- "E:/Lidar_2022/R/trials/trial_dtm/plot/plot_{PlotID}"
plot <- clip_roi(las_cat, Buffer)
## function for getting the metrics
routine <- function(chunk){
las <- readLAS(chunk)
if (is.empty(las)) return(NULL)
data.frame(cloud_metrics(las, ~stdmetrics(X,Y,Z,Intensity,ReturnNumber,Classification,dz=1, zmin=1)))
}
#getting the metrics
opt_output_files(plot) <- "E:/Lidar_2022/R/trials/trial_dtm/plot/{ORIGINALFILENAME}"
catalog_apply(plot, routine) And getting error "Error in bboxes[[i]] : subscript out of bounds" Thanks again |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I run the same codes that I used to it. but I encountered an error in my last code.
I think the output of "clip_roi" doesn't include any data.
I checked the coordinate of the shapefile that they used the same coordinate system.
I had no problems when I running this code with same dataset.
Can you please look at it?
las.zip
las.zip
Beta Was this translation helpful? Give feedback.
All reactions