BuildAssetCatalog: LidarIndexR - Create spatial index by reading LAS/LAZ file...

BuildAssetCatalogR Documentation

LidarIndexR – Create spatial index by reading LAS/LAZ file headers

Description

Reads LAS/LAZ file headers to build bounding boxes for each tile and stores header attributes with each bounding box. Optionally writes information to outputFile. Typically used by passing a folder name in basePath and a file extension template such as "//.las|//.laz". You can also specify folders under the basePath using folderName and pointFolder. You can omit all folder information and provide a list of point files in fullFileList. CRS information is read from point files. If you provide projString, it will override the CRS found in the point files.

Usage

BuildAssetCatalog(
  folder = "",
  fileType = "\\.las|\\.laz",
  crs = "",
  outputcrs = "",
  fullFileList = character(0),
  dimensionThreshold = 50000,
  headerMethod = "rcpp",
  outputFile = "",
  rebuild = FALSE,
  quiet = TRUE
)

Arguments

folder

Path for a folder. Trailing slash should not be included.

fileType

Any valid string for the pattern parameter in grep(). "$" will be appended to the string to search for file/folder names ending with values in fileType.

crs

A valid projection string that can be used with the crs parameter in st_sf. projString should represent the projection of the point data. crs should be WKT.

outputcrs

A valid projection string that can be used with the crs parameter in st_transform to reproject the index.

fullFileList

List of point tiles. Will be used instead of generating new list.

dimensionThreshold

Size threshold used to omit files from the index. This is intended to help omit invalid LAS/LAZ files from the index. If the height or width of the point tile exceeds the threshold, the tile will be omitted.

headerMethod

String indicating the method that should be used to read LAS file headers. Choices are: "direct", "lidr", or "rcpp".

outputFile

Full path and filename on the local file system for the index file. The only supported format for catalogs is geopackage.

rebuild

Boolean. If TRUE, the index is always created. If FALSE, the index is only created if it does not already exist.

quiet

Boolean to control display of status information. If TRUE, information is not displayed. Otherwise, status information is displayed.

Value

Boolean (invisible) indicating success or failure. If rebuild = FALSE and outputFile exists, returns TRUE.

Examples

## Not run: 
BuildAssetCatalog()

## End(Not run)

bmcgaughey1/LidarIndexR documentation built on April 14, 2025, 6:07 p.m.