在以下代码中,可以使用这些属性导入部分LAS文件版本1.1:
名单.项目格式大小必需
并返回x,y,z和强度(上面列表的第1到4行):
allbytes <- matrix(readBin(con, "raw", n = pointDataRecordLength * numberPointRecords, size = 1, endian = "little"),
ncol= pointDataRecordLength, nrow = numberPointRecords, byrow = TRUE)
close(con)
mm <- matrix(readBin(t(allbytes[,1:(3*4)]), "integer", size = 4, n = 3 * numberPointRecords, endian = "little"), ncol = 3, byrow = TRUE)
mm[,1] <- mm[ ,1] * xyzScaleOffset[1,1] + xyzScaleOffset[1, 2]
mm[,2] <- mm[ ,2] …Run Code Online (Sandbox Code Playgroud) r ×1