I have a bit of an unusual LAS tiles. I know that all my points represent "ground". The LAS files were already pre-processed and classified. But all the points are Class = 8L. I need to reclassify all of them to 2L to be able to work with them as terrain.
I see it works fine for LAS class, where the Classification slot is. las$Classification <- 2L
but how to do this for LAScatalog? I tried several ways but no success. Maybe it is possible to define a custom Classifier?
EDIT: Proposed spolution by @JRR works perfectly for me, but only for single las tile, not for LAScatalog.
l<-list.files(mylasfiles)
cg<-readLAScatalog(l[1:10], filter = "-change_classification_from_to 8 2") # does not work
cg<-readLAScatalog(l[1], filter = "-change_classification_from_to 8 2") # works fine