As the title says, I am getting a NULL error in my code below.
# Read dtm for normalization dtm <- raster("AlexSub2DTM.tif") # Read trunks trunks <- readOGR(dsn = "trunksfilterout2o.shp") # read Large las as lasCatalog las1<- readLAScatalog("Alex2swathclipped.las") # Variables for processing opt_output_files(las1) <- "./lasCat/laschunk_{ID}" opt_chunk_size(las1) <- 495 # Processing chunks of 495 x 495 opt_chunk_buffer(las1) <- 15 # 15 ft buffer opt_stop_early(las1) <- TRUE # or FALSE opt_filter(las1) <- "-drop_z_below 15" # Normalize las1 <- normalize_height(las1, dtm, na.rm = TRUE, method = "bilinear", overwrite = TRUE) # CHM opt_output_files(las1) <- "./lasCat/laschml_{ID}" chml1 <- rasterize_canopy(las1, 0.25, pitfree(c(0,2,5,10), c(0,1), subcircle = 0.2), overwrite = TRUE) # Smoothing ker = matrix(1,3,3) chml1 = focal(chml1, w = ker, fun = median) chml1 = focal(chml1, w = ker, fun = median) # Save output writeRaster(chml1, filename="As2_chml3_pf.tif", overwrite=TRUE) # Tree Segmentation algotr1 <- silva2016(chml1, trunks, exclusion = 0.5, ID = "treeID") lastr1 <- segment_trees(las1, algotr1)
This is a small subset from a much larger project so scalability is non-negotiable and clipping is the smartest way for me to reduce total file size. My las is a non-rectangular ROI clip (pit-free and no voids/holes).
Would this cause the NULL error or should I look elsewhere?
(zip with all data is over 1Gb and won't upload)
lastr1 <- segment_trees(las1, algotr1) #> Processing [======>-----------------------------------------------------------] 8% (1/12) eta: 2m #> Error: NULL value passed as symbol address
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4