Clip LiDAR points within a given geometry and convenient wrappers for most common geometries
lasclip(x, geometry, ofile = "")lasclipRectangle(x, xleft, ybottom, xright, ytop, ofile = "")
lasclipPolygon(x, xpoly, ypoly, ofile = "")
lasclipCircle(x, xcenter, ycenter, radius, ofile = "")
An object of class LAS
or LAScatalog
.
a geometric object. Currently Polygon
from sp
is supported.
character. Path to an output file (only with a LAScatalog
).
If ofile = ""
the result is loaded into R, otherwise the result is written to a
file while reading. This is much more memory efficient than loading into R first, then writing.
scalar of left x position of rectangle.
scalar of bottom y position of rectangle.
scalar of right x position of rectangle.
scalar of top y position of rectangle.
numerical array. x-coordinates of polygon.
numerical array. y-coordinates of polygon.
scalar of x disc center.
scalar of y disc center.
scalar of disc radius.
An object of class LAS
or NULL if the result is immediately written to a file.
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile)
subset = lasclipRectangle(las, 684850, 5017850, 684900, 5017900)
plot(subset)
# }
Run the code above in your browser using DataLab