I have five LAScatalog objects from five different subfolders present in the same parent folder. I would like to plot them together on an interactive Leaflet plot using lidR?

Please note that I know I can copy all the files into one folder, but the files are too many and R cannot handle those many points even though I do have 64 GB RAM.

How can I do this?

Sample Code:


# Import the list of LAS files in the folder
FL_LAS_List = readLAScatalog("ParentFolder/SubFolder1")
BC_LAS_List_NE = readLAScatalog("ParentFolder/SubFolder2")
BC_LAS_List_NW = readLAScatalog("ParentFolder/SubFolder3")
BC_LAS_List_SW = readLAScatalog("ParentFolder/SubFolder4")
BC_LAS_List_SE = readLAScatalog("ParentFolder/SubFolder5") 

# Plot individual LAS objects
plot(FL_LAS_List, mapview = TRUE,
     map.type = "OpenStreetMap")

# Plot all five LAS catalog objects on a single map using the above plot code
# Stuck!!!....

1 Answer 1


I can see two options here.

Use only one collection

Either using

rbind(FL_LAS_List, BC_LAS_List_NE, BC_LAS_List_NW, ...)

or reading the files recursively from subfolders with

readLAScatalog("ParentFolder/", reccursive = TRUE)

Cast each catalog into sf objects

Then use mapview or other packages like leaflet

FL_LAS_List_sf = sf::st_as_sf(FL_LAS_List)
mapview::mapview(list(FL_LAS_List_sf, BC_LAS_List_NE_sf, ...))
  • The first option returns an error unused argument (reccursive = TRUE). Sep 21 at 16:28
  • 1
    recursive takes only one c
    – JRR
    Sep 21 at 16:30

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.