You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by kulpojke May 5, 2022
I am using the lidR package to do some tree segmentation on a set of 561 km² tiles using the LAScatalog engine and the futures library for parallelization. I have successfully created the DTM, but when I attempt to normalize I get an error.
I have read this thread already and it did not solve my problem.
I am running inside of a container (rocker/tidyverse:4.2) with the following:
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS
future_1.25.0
lidR_4.0.0
Here is the code:
# import libraries
library(lidR)
library(future)
plan(multisession)
# define some paramaters, currently using ft :(chunk_size<-1000# chunk size buff<-50# buffer sizeresolution<-2# raster resolution# (1) path to data path<-'/data'# make las catalogctg<- readLAScatalog(path)
# set disk storage option by assigning a filename template to a function
opt_output_files(ctg) <- paste0(tempdir(), "/{XCENTER}_{YCENTER}_{ID}")
# create index files (lax) to index points within laz files. speeds up reads.lidR:::catalog_laxindex(ctg)
# set the chunk buffer ofr ctg
opt_chunk_buffer(ctg) <-buff# set the chunk size for ctg
opt_chunk_size(ctg) <-chunk_size# make dtm
opt_output_files(ctg) <- paste0(tempdir(), "/{XCENTER}_{YCENTER}_{ID}_dtm")
dtm<- rasterize_terrain(ctg, resolution, tin())
# in my Rmd I plot the dtm here and it looks right# normalise ctg
opt_output_files(ctg) <- paste0(tempdir(), "/{XCENTER}_{YCENTER}_{ID}_norm")
ctg_norm<- normalize_height(ctg, dtm)
During the normalization I get the following warning, then error:
Processing [-----------------] 0% (0/1152) eta: ?sWarning: There are 3 points flagged 'withheld'.
Processing [-----------------] 0% (1/1152) eta: 4hError: NULL value passed as symbol address
After reading this thread. I tried disabling multisession and using set_lidr_threads,
Which is likely to be very similar to your error. SpatRaster are not serializable and I think this is what caused the error. However I do not have error with sequential processing because only one worker is implied and no serialization is involved. Are you sure you really disabled plan(multissesion). Did you start a fresh session or reset the strategy with plan(sequential)?
Edit: in another run I also go Error : NULL value passed as symbol address (with multisession)
Side note: plan(multisession) and s/get_lidr_threads() are doing very different things.
Fixed with a workaround. If user is using a parallel strategy SpatRaster are converted to RasterLayer. There is not way to work with SpatRaster
Hi, I'm currently experiencing the same issue when attempting to normalize height and I don't quite understand this work around. Do you mind explaining in a little more depth?
Discussed in #579
Originally posted by kulpojke May 5, 2022
I am using the lidR package to do some tree segmentation on a set of 561 km² tiles using the
LAScatalog
engine and the futures library for parallelization. I have successfully created the DTM, but when I attempt to normalize I get an error.I have read this thread already and it did not solve my problem.
I am running inside of a container (
rocker/tidyverse:4.2
) with the following:Here is the code:
During the normalization I get the following warning, then error:
After reading this thread. I tried disabling multisession and using set_lidr_threads,
but the problem persists. Any insights would be greatly appreciated.
The text was updated successfully, but these errors were encountered: