This function calculates the total area sampled by receivers, under the assumption of a constant detection range. To implement the function, receiver locations must be supplied as a SpatialPoints or SpatialPointsDataFrame object with the Universe Transverse Mercator coordinate reference system. The get_detection_containers is used to calculate the detection containers around receivers, given a specified detection range (m) and any barriers to detection, such as coastline, and then the total area covered by receivers is calculated, accounting for overlapping containers.

get_detection_area_sum(
  xy,
  detection_range = 425,
  coastline = NULL,
  scale = 1/(1000^2),
  plot = TRUE,
  ...
)

Arguments

xy, detection_range, coastline, plot, ...

Arguments required to calculate and visualise detection containers via get_detection_containers; namely, receiver locations (xy), the detection range (detection_range), barriers to detection (coastline), and whether or not to plot the containers (plot).

scale

A number that scales the total area (m). The default (1/(1000^2)) converts the units of \(m^2\) to \(km^2\).

Value

The function returns a number that represents the total area surveyed by receivers (by default in \(km^2\)) and, if plot = TRUE, a plot of the area with receivers and their detection ranges.

Details

This is a simple metric of the overall receiver sampling effort. This may be a poor metric if the assumption of a single detection range across all receivers is substantially incorrect or if there are substantial changes in the receiver array over the course of a study.

See also

get_detection_containers defines detection containers, across which the detection area is calculated. get_detection_area_ts calculates the area sampled by receivers through time.

Author

Edward Lavender

Examples

#### Define receiver locations as a SpatialPoints object with a UTM CRS
proj_wgs84 <- sp::CRS(SRS_string = "EPSG:4326")
proj_utm <- sp::CRS(SRS_string = "EPSG:32629")
xy <- sp::SpatialPoints(
  dat_moorings[, c("receiver_long", "receiver_lat")],
  proj_wgs84
)
xy <- sp::spTransform(xy, proj_utm)

#### Example (1): Calculate the total area sampled by receivers
get_detection_area_sum(xy)
#> Warning: GEOS support is provided by the sf and terra packages among others

#> [1] 16.94072

#### Example (2): Account for barriers in the study area
get_detection_area_sum(xy, coastline = dat_coast)
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: spgeom1 and spgeom2 have different proj4 strings

#> [1] 16.33558

#### Example (3): Adjust the detection range
get_detection_area_sum(xy, detection_range = 400, coastline = dat_coast)
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: spgeom1 and spgeom2 have different proj4 strings

#> [1] 14.93851
get_detection_area_sum(xy, detection_range = 500, coastline = dat_coast)
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: spgeom1 and spgeom2 have different proj4 strings

#> [1] 20.68055

#### Example (4): Adjust the units
get_detection_area_sum(xy, coastline = dat_coast, scale = 1) # m2
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: spgeom1 and spgeom2 have different proj4 strings

#> [1] 16335577

#### Example (5): Suppress the plot
get_detection_area_sum(xy, coastline = dat_coast, plot = FALSE)
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: GEOS support is provided by the sf and terra packages among others
#> Warning: spgeom1 and spgeom2 have different proj4 strings
#> [1] 16.33558