get_flightline_overlaps: Identifies overlapping and non-overlapping parts of flight...

get_flightline_overlapsR Documentation

Identifies overlapping and non-overlapping parts of flight line polygons.

Description

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.

Usage

get_flightline_overlaps(polys)

Arguments

polys

An sf data frame of polygons as returned by function get_flightline_polygons.

Value

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.

Examples

## 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)


mbedward/CERMBlidar documentation built on April 10, 2024, 2:05 p.m.