1

I am trying to stich a few LAS tiles into a single file. The final retiled LAS appears to be clipped.

How can I fix the clipping issue?

LAS list catalog plot:

enter image description here

Code:

library(lidR)

# Create a LAS catalog object
LAS_List = readLAScatalog("path")

# Merge LAS files into a single LAS file
opt_chunk_buffer(LAS_List ) = 0
opt_chunk_size(LAS_List ) = 10000
opt_output_files(LAS_List ) = paste0("path2/Final_LAS")
catalog_retile(LAS_List )

# Plot the merged LAS
Final_LAS = readLAScatalog("path2")

plot(Final_LAS , mapview = TRUE,
     map.type = "OpenStreetMap")

Retile output:

enter image description here

Pattern of chunks (chunk size = 500):

enter image description here

1
  • Using a chunk size 1000000 fixes the problem, it does however a bigger tile including areas outside the input tiles. Sep 21 at 16:34

1 Answer 1

1

I don't know. Here is a guess that you will be able to validate. You put 10000 for chunk size. But the alignment of the chunks may have created two chunks. You did not provided any template in the filename so the chunk 1 is written in Final_LAS.las and the second chunk is written in the same file which is erased.

If I'm correct the following code snippet should display two chunks

opt_chunk_buffer(LAS_List ) = 0
opt_chunk_size(LAS_List ) = 10000
plot(LAS_list, chunk = TRUE)

Then you can fix it with opt_chunk_alignment().

If I'm wrong you must provide more information

2
  • Running opt_chunk_alignment(LAS_list) returns [1] 0 0, does this seem okay? Sep 21 at 16:45
  • 1
    This is the default. Change it so it aligns differently. Use e.g opt_chunk_alignment(LAS_list) = c(0, 3000)to see how it affects the chunk pattern. It should shift the chunks by y = 3000
    – JRR
    Sep 21 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.