TreeLS (version 1.0)

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 area to be cropped.

len

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

circle

logical - if TRUE (default), crops a circle, otherwise a square.

negative

logical - if TRUE, returns all points outside the specified circle/square boundaries, otherwise returns all points inside the circle/square (default).

Value

LAS object.

Examples

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

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

tls = tlsCrop(tls, 15, 10, 3, FALSE, FALSE)
plot(tls)
# }

Run the code above in your browser using DataCamp Workspace