Learn R Programming

TreeLS (version 2.0.2)

tlsCrop: Point cloud cropping

Description

Returns a cropped point cloud of all points inside or outside specified boundaries of circle or square shapes.

Usage

tlsCrop(las, x, y, len, circle = TRUE, negative = FALSE)

Arguments

las

LAS object.

x, y

numeric - X and Y center coordinates of the crop region.

len

numeric - if circle = TRUE, len is the circle's radius, otherwise it is the side length of a square.

circle

logical - crops a circle (if TRUE) or a square.

negative

logical - if TRUE, returns all points **outside** the specified circle/square perimeter.

Value

LAS object.

Examples

Run this code
# NOT RUN {
file = system.file("extdata", "pine_plot.laz", package="TreeLS")
tls = readTLS(file)

tls = tlsCrop(tls, 2, 3, 1.5, TRUE, TRUE)
plot(tls)

tls = tlsCrop(tls, 5, 5, 5, FALSE, FALSE)
plot(tls)
# }

Run the code above in your browser using DataLab