check_overlap_bias: Performs a simple check for point class bias within...

check_overlap_biasR Documentation

Performs a simple check for point class bias within flightline overlaps

Description

This function examines ground (class 2) and vegetation (classes 3-5) points and checks whether the ratio of vegetation to ground points differs substantially between overlapping and non-overlapping areas of flight lines.

Usage

check_overlap_bias(
  las,
  ov_polys,
  nsample_points = 1e+05,
  bias_threshold = 1.5,
  water_as_ground = TRUE,
  min_polygon_area = 1000,
  min_points = 100
)

Arguments

las

A LAS object, e.g. imported using prepare_tile.

ov_polys

An sf data frame of polygons as returned by the function get_flightline_overlaps.

nsample_points

The number of points to sample from the LiDAR point cloud.

bias_threshold

The threshold value, above which bias is considered to be present. Default value is 1.5. See Details for more explanation.

water_as_ground

If TRUE (default), treat class 9 (water) points as ground points when calculating vegetation class ratio values.

min_polygon_area

The minimum area of polygons to consider. This is intended to remove tiny polygons, e.g. that can result from the intersection of complex flight lines. The default value of 1000 assumes that map units for both the LAS tile and the derived polygon layer (which should be in the same map projection) are metres.

min_points

The minimum number of points that must be in each of the ground and vegetation classes for a ratio to be calculated. This is to guard against cases where there are no ground points, and also to avoid bias assessment on unreliable ratios based on only a small number of vegetation points. The default is 100 points.

Details

The check performed by this function is a simple heuristic rather than being statistically rigorous. It seems to work most (but not all) of the time, but can fail when the pattern of flight lines is complex. For each of overlapping and non-overlapping flight line areas, the number of points for each class is determined. Next, the ratio of vegetation points to ground points is calculated for each of the vegetation classes. Finally, these ratios are compared between overlap and non-overlap areas. If any vegetation class ratio in the overlap area is more than bias_threshold times greater than the corresponding value in the non-overlap area, the check returns TRUE.

Value

A logical value, where TRUE indicates that bias has been detected. An attributes list is attached to the value with elements nsample_points and ratio_data. The latter element is a data frame with a record for each point class, and columns for the number of points and ratio of vegetation class to ground class points within each of overlapping and non-overlapping areas. Note that the attributes will be missing if there were no overlapping flight line polygons.

See Also

remove_flightline_bias

Examples

## Not run: 
fl_polys <- get_flightline_polys(las)
ov_polys <- get_flightline_overlaps(fl_polys)
res <- check_overlap_bias(las, ov_polys)

if (res) {
  cat("Flight line overlap bias is present \n")

  # Get the table of results to determine which point class(es)
  # have biased representation in overlap areas
  dat <- attr(res, "ratio_data")
  print(dat)
}

## End(Not run)


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