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

BuildIndexFromLocalPointsR 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

BuildIndexFromLocalPoints(
  basePath = "",
  fileType = "\\.las|\\.laz",
  folderName = "",
  pointFolder = "",
  projString = NA,
  outputCRS = NA,
  fullFileList = character(0),
  dimensionThreshold = 50000,
  headerMethod = "rcpp",
  outputFile = NULL,
  rebuild = FALSE,
  quiet = FALSE
)

Arguments

basePath

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.

folderName

Folder name on the basePath containing LAS/LAZ files. Can be an empty string.

pointFolder

Folder under folderName containing point files. Can be an empty string.

projString

A valid projection string that can be used with the crs parameter in st_sf. projString should represent the projection pf the point data. If using EPSG codes, do not enclose the EPSG number in quotes.

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.

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

An sf object (invisible) containing tile bounding boxes and attributes.

Examples

## Not run: 
BuildIndexFromPoints()

## End(Not run)

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