lidR (version 1.2.0)

catalog_queries: Extract LiDAR data based on a set of coordinates

Description

When the user has a set of (x, y) coordinates corresponding to a region of interest (ROI), a ground inventory for example, they can automatically extract the lidar data associated with the ROIs from a Catalog. The algorithm will do this even for ROIs falling on the edges of one or more tiles. It works only for tiles that are arranged in gridlines.

Usage

catalog_queries(obj, x, y, r, r2 = NULL, roinames = NULL,
  mc.cores = parallel::detectCores())

Arguments

obj

A Catalog object

x

vector. A set of x coordinates corresponding to the center of the ROI

y

vector. A set of y coordinates corresponding to the center of the ROI

r

numeric or vector. A radius or a set of radii of the ROI. If only r is provided (r2 = NULL) it will extract data falling onto a disc.

r2

numeric or vector. A radius or a set of radii of plots. If r2 is provided, the selection turns into a rectangular ROI. If r = r2 it is a square.

roinames

vector. A set of ROI names (the ID of the plots, for example)

mc.cores

numeric. The number of cores for parallel processing (see makeCluster)

Value

A list of LAS objects

See Also

readLAS Catalog catalog_queries

Examples

Run this code
# NOT RUN {
# Build a Catalog
catalog = catalog("<Path to a folder containing a set of .las or .laz files>")

# Get coordinates from an external file
X = runif(30, 690000, 800000)
Y = runif(30, 5010000, 5020000)
R = 25

# Return a List of 30 circular LAS objects of 25 m radius
catalog %>% catalog_queries(X, Y, R)

# Return a List of 30 square LAS objects of 50x50 m
catalog %>% catalog_queries(X, Y, R, R)
# }

Run the code above in your browser using DataCamp Workspace