get_flightline_polygons | R Documentation |
Given an input LAS
object, this function returns an sf
spatial
data frame with a convex polygon for each flight line or, optionally, each
combination of flight line and point class. The default is to only consider
the ground class (2) and the vegetation classes (3-5). Drawing the resulting
polygons grouped by point class (see example below) can help in checking for
biased representation of point classes in overlap areas.
get_flightline_polygons(las, classes = 2:5, group_classes = FALSE)
las |
A LAS object, e.g. imported using |
classes |
Vector of one or more integer codes for point classes to
consider. Default is |
group_classes |
If |
An sf
data frame with columns flightlineID
,
Classification
(if group_classes
is TRUE
), and
group_classes
. The coordinate reference system is set to that of the
input LAS
object, or to its horizontal component if the input object
has a compound (horizontal plus vertical) CRS.
## Not run:
library(ggplot2)
fl_polys <- get_flightline_polygons(las, group_classes = TRUE)
# Draw flight line polygons separately for each point class
ggplot(data = fl_polys) +
geom_sf(aes(fill = factor(flightlineID)), alpha = 0.4) +
facet_wrap(~ Classification)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.