Skip to contents

This function builds a simple transect design layout, consisting of parallel transects covering a given area in the virtual environment, spaced out by a given distance. The layout can either be horizontal (the default) or vertical. The transects can be segmentized to a given length, and transects or segments can be buffered.

Usage

generate_survey_plan(
  bbx_xmin,
  bbx_xmax,
  bbx_ymin,
  bbx_ymax,
  start_x,
  end_x,
  start_y,
  end_y,
  space_out_factor,
  type = "horizontal",
  segmentize = FALSE,
  merge_last_seg = FALSE,
  seg_length,
  buffer = FALSE,
  buffer_width
)

Arguments

bbx_xmin, bbx_xmax, bbx_ymin, bbx_ymax

numeric. Limits of the bounding box the transects will be generated in

start_x, end_x

numeric. Start and end x coordinates of the transects

start_y, end_y

numeric. Start and end y coordinates of the transects

space_out_factor

numeric. Number of space units between transects

type

character. Either "horizontal" (the default) or "vertical

segmentize

Boolean. If TRUE, the transects are cut in smaller segments. Default to FALSE.

merge_last_seg

Boolean. Should the last segment of a transect be merged with the previous one? Default to FALSE

seg_length

numeric. Segment length.

buffer

Boolean. Should a buffer be drawn around transects or segments? If segmentize is TRUE, buffers are drawn around segments, if segmentize is FALSE, they are drawn around transects.

buffer_width

numeric. Width of the buffer on each side of the segments or transects.

Value

A named list.

See also

Other survey simulation functions: assign_flight_plan(), detection_process(), launch_survey_on_movement()

Examples

surv <- generate_survey_plan(bbx_xmin = 30, bbx_xmax = 65, bbx_ymin = 30, bbx_ymax = 65,
                             start_x = 34, end_x = 60, start_y = 34, end_y = 68,
                             space_out_factor = 2, segmentize = TRUE, seg_length = 1,
                             buffer = TRUE, buffer_width = 0.2)
par(mfrow = c(2,2), mar = c(2.5,2.5,4,0.5))
raster::plot(surv$bbx, axes = TRUE, main = "bounding box")
plot(sf::st_geometry(surv$transects), axes = TRUE, main = "transects")
plot(sf::st_geometry(surv$segments), axes = TRUE, main = "segments")
plot(sf::st_geometry(surv$buffered_segments), axes = TRUE, main = "buffered seg")