View source: R/UtilityFunctions.R
readLDA | R Documentation |
readLDA
reads point data stored in FUSION's LDA format and returns either a data frame or
a LAS-class object. To create the LAS-class object, you must provide an existing LAS or LAZ
file to provide a template for the LAS header. Typically, this would be a file used to clip the
LDA file using TreeSeg
(this is the only FUSION program that can't output LAS files). The
template file also provides coordinate system information for the LAS-class object.
readLDA(fileName = NULL, type = "DF", epsg = NULL, LASTemplate = NULL)
fileName |
character (required): Name of the LDA file containing point data. |
type |
character: Desired return type: "DF" for a data frame and "LAS" for LAS-class object. |
epsg |
numeric: EPSG code defining the projection for the point data. This is assigned to the LAS-class
object when |
LASTemplate |
character: File name (including path) for the LAS/LAZ file that will provide a template
for the LAS header. Used only when |
When type = "DF"
(default), the return is a data frame containing the following columns:
x
y
x
pulse: pseudo-pulse number. This is generated using the GPS time when the LDA file is created
return: return number
angle: scan angle rank
intensity: intensity
When type = "LAS"
, the LAS-class object returned by readLDA
is somewhat imperfect.
Many of the attributes for individual points are not populated with valid values because the LDA
format does not have all of the information required to fully populate the point records. In
particular, GPS time,number of returns in the pulse, and classification are not available.
NumberOfReturns for all point records is set to 1 for all point records. This may cause tools
designed to evaluate the validity of LAS data to throw warning since there may be points labeled
as return 2, 3, ... yet the NumberOfReturns will still be 1.
Return value depends on type
. If type = "DF"
, return value is
a (invisible) data frame with the columns listed above. If type = "LAS"
, return value is a
(invisible) LAS-class object compatible with the lidR package.
Other helpers:
readDTM()
,
writeDTM()
## Not run:
pts <- readLDA("points.lda")
las <- readLDA("points.lda", type = "LAS", LASTemplate = "source.las")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.