create_transect: Create transect

View source: R/create_transect.R

create_transectR Documentation

Create transect

Description

This function allows to create transects by reusing the make.design function of the dssd package. The make.design function allows to:

  • choose different types of survey design such as zigzag or parallel transects design

  • choose the desired transect length (approximately) line.transect

  • choose the angle of the transects design angle

  • choose the spacing between transects spacing

  • and others : see ?make.design

Usage

create_transect(
  region_obj,
  crs,
  design,
  design.angle,
  line.length,
  truncation,
  ...
)

Arguments

region_obj

Region object from dssd package. The map containing information about the geometry of the study area.

crs

Numeric. Projection system.

design

Character. Variable describing the type of design. Either "random", "systematic", "eszigzag" (equal-spaced zigzag), "eszigzagcom" (equal spaced zigzag with complementary lines) or "segmentedgrid". See dssd package for more information.

design.angle

Numeric. Value detailing the angle of the design. A value of -1 will cause a random design angle to be generated. See dssd package for more information.

line.length

Numeric. The approximative total line length desired.

truncation

Numeric. A single numeric value (in m) describing the longest distance at which an object may be observed.

...

All other arguments that could be used in the make.design function. See dssd package for more information.

Details

In contrast to make.design, the create_transect function returns an sf object (data.frame) containing information about the different transects created.

Value

sf object. The created transects.

Examples

library(sf)
library(dssd)
library(dsims)

# Use of the St Andrews bay map from the dssd package
shapefile.name <- system.file("extdata", "StAndrew.shp", package = "dssd")

# Creation of the object with the make.region function of the dsims package
region <- make.region(region.name = "St Andrews bay",
                      shape = shapefile.name,
                      units = "m")

transects <- create_transect(region_obj = region,
                             crs = 2154,
                             design = "eszigzag",
                             line.length = 400000,
                             design.angle = 30,
                             truncation = 400)

head(transects)

transects %>%
  st_length() %>%
  sum()


maudqueroue/intercali documentation built on Oct. 8, 2022, 2:09 p.m.