get_flightline_overlaps | R Documentation |
Given a set of flight line polygons created with function
get_flightline_polygons
, this function creates a new set of
polygons representing the overlapping and non-overlapping parts. Note: at
present, point classes are not considered separately. If the input sf
data frame of polygons includes a Classification
column, the polygons
for each class will be merged prior to identifying overlap and non-overlap
parts.
get_flightline_overlaps(polys)
polys |
An |
An sf
data frame of polygons for the separate and overlapping
parts of flight lines, with columns: overlap
(character label; either
'overlapping' or 'separate'), flightlineIDs
(character label; single integer
for separate parts, or colon-separated integers for overlapping parts, e.g. '2:4'
);
area
polygon area in map units; geometry
.
## Not run:
library(ggplot2)
fl_polys <- get_flightline_polys(las)
ov_polys <- get_flightline_overlaps(fl_polys)
# Calculate polygon centroids to position labels
centroids <- sf::st_centroid(ov_polys)
# Draw polygons for overlapping and non-overlapping areas
ggplot(data = ov_polys) +
geom_sf() +
geom_sf_text(data = centroids, aes(label = flightlineIDs)) +
coord_sf(datum = st_crs(ov_polys)) +
labs(x = "", y = "") +
facet_wrap(~overlap)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.