Trying to further classify a las catalog that already has buildings, bridges, noise and ground classified. I want to break the unassigned points into vegetation classes by height but can't get it to work. some previous questions have used tree segmentation, I haven't run individual tree segmentation and I don't think I need to?
vegetation_class = function(Z)
{
mz = max(Z)
if (mz < 6)
return(LASLOWVEGETATION)
else if (mz >= 6 & mz <12)
return(LASMEDIUMVEGETATION)
else if (mz >=12 & mz <60)
return(LASHIGHVEGETATION)
else
return(LASNOISE)
}
veg_ctg@data[Classification = vegetation_Class(Z)]
writeLAS(veg_ctg, "D:mypath/new1.las", index = FALSE)```
Any help is greatly appreciated.