Skip to main content
Tweeted twitter.com/StackGIS/status/1181086885185298437
edited tags
Link
Spacedman
  • 66.5k
  • 6
  • 83
  • 121
Removed thanks.
Source Link
TomazicM
  • 27k
  • 24
  • 31
  • 42

I'm working with the R package lidR to process point clouds. I have a raster with 4 coarse land cover classes and the corresponding tile with the LiDAR data in las format (both in the same coordinate system). Now I want to attach the land cover classes to the point cloud with the lasmergespatial tool from the lidR package.

#import las
mylas<-readLAS(files="xyz.las", select = "xyzia", filter = "")


#import raster as rasster (not as stack)
landcover<-raster("LC_raster.tif")

#classify las with raster
class_las<-lasmergespatial(mylas, landcover, attribute = "class")

So basically I don't get errors but the attribute class in the new created las file is empty with NA. Does anyone have a suggestion whatWhat might be a problem? Thanks a lot!

I'm working with the R package lidR to process point clouds. I have a raster with 4 coarse land cover classes and the corresponding tile with the LiDAR data in las format (both in the same coordinate system). Now I want to attach the land cover classes to the point cloud with the lasmergespatial tool from the lidR package.

#import las
mylas<-readLAS(files="xyz.las", select = "xyzia", filter = "")


#import raster as rasster (not as stack)
landcover<-raster("LC_raster.tif")

#classify las with raster
class_las<-lasmergespatial(mylas, landcover, attribute = "class")

So basically I don't get errors but the attribute class in the new created las file is empty with NA. Does anyone have a suggestion what might be a problem? Thanks a lot!

I'm working with the R package lidR to process point clouds. I have a raster with 4 coarse land cover classes and the corresponding tile with the LiDAR data in las format (both in the same coordinate system). Now I want to attach the land cover classes to the point cloud with the lasmergespatial tool from the lidR package.

#import las
mylas<-readLAS(files="xyz.las", select = "xyzia", filter = "")


#import raster as rasster (not as stack)
landcover<-raster("LC_raster.tif")

#classify las with raster
class_las<-lasmergespatial(mylas, landcover, attribute = "class")

So basically I don't get errors but the attribute class in the new created las file is empty with NA. What might be a problem?

Source Link
Reto
  • 31
  • 1
Loading