【问题标题】:Creating orthomosaic from *.las point cloud in R从 R 中的 *.las 点云创建正射镶嵌
【发布时间】:2021-06-24 17:59:53
【问题描述】:

有没有办法将 R 中的 *.las 点云导出到正射镶嵌?我使用包 lidR 加载了包含点的 las 文件。我想导出一个 tif,它以 RGB 从上方显示点云,类似于正射影像的样子。数据是使用地面激光扫描仪收集的。

point cloud

this is what I want

【问题讨论】:

  • 本书的这一章可能会对你有所帮助jean-romain.github.io/lidRbook/…。没有单一的方法可以实现这一点,因此您必须更具体地了解如何聚合点云。

标签: r tiff lidar lidar-data las


【解决方案1】:

好的,所以我想出了怎么做,虽然它不是很优雅:

# load data
points <- readLAS(input_path)

# returns the RGB values for the highest points
RGBZ <- function(r,g,b,z) {
  bands = list(
    R = r[which.max(z)],
    G = g[which.max(z)],
    B = b[which.max(z)]
  )
  return(bands)
}

# create & save ortho
ortho <- grid_metrics(points, ~RGBZ(R,G,B,Z), res = 0.1)
writeRaster(ortho, output_path)

【讨论】:

  • 您只能计算一次which.max(z),您的解决方案将是优雅的;-)
猜你喜欢
  • 2021-02-10
  • 2020-12-12
  • 2019-04-11
  • 1970-01-01
  • 2014-03-16
  • 1970-01-01
  • 2020-11-01
  • 2018-06-17
  • 2019-03-31
相关资源
最近更新 更多