Plan an acoustic-trawl survey.

DefineSurveyPlan(
  processData,
  UseProcessData = FALSE,
  DefinitionMethod = c("Parallel", "ZigZagRectangularEnclosure", "ZigZagEqualSpacing",
    "ResourceFile"),
  FileName = character(),
  StratumPolygon,
  StratumNames = character(),
  Bearing = c("Along", "Across", "AlongReversed", "AcrossReversed"),
  BearingAngle = numeric(),
  Retour = FALSE,
  SurveyTime = numeric(),
  SurveyDistance = numeric(),
  SurveySpeed = numeric(),
  EqualEffort = TRUE,
  OrderAllToursFirst = FALSE,
  Seed = numeric(),
  Margin = 0.1
)

Arguments

processData

The current data produced by a previous instance of the function.

UseProcessData

Logical: If TRUE use the existing function output in the process.

DefinitionMethod

Character: A string naming the method to use, either "ResourceFile" for reading the survey plan from a file, or a string naming the type of survey design to create (see details).

FileName

The path to a resource file from which to read the SurveyPlan process data, in the case that DefinitionMethod is "ResourceFile".

StratumPolygon

The StratumPolygon process data.

StratumNames

Character: The names of the strata to include in the survey plan. Defaults to all strata.

Bearing

Character: A string indicating the survey bearing (direction) of each . See Details for options.

BearingAngle

Numeric: In the case that Bearing = "Angle", BearingAngle gives the angle of the survey bearing (direction) counter clockwise from north in degrees.

Retour

Logical: If TRUE the survey plan will be doubled by a retour.

SurveyTime, SurveyDistance

The time/traveled distance to spend in each stratum including transport between segments, given in hours/nautical miles, where SurveyDistance has precedence over SurveyTime. The vector is repeated to have length equal to the number of strata specified in strata, so that only one value is given, this is the hours/nmi in all strata. Optionally, if a single value is enclosed in a list, it is regarded as the total hours/nmi for the entire survey. In this case selecting only a subset of the strata using strata will increase the effort in the selected strata.

SurveySpeed

Numeric: The time to be used for each stratum. Note that the resulting accumulated time may not be exactly equal to SurveyTime.

EqualEffort

Character: A string naming the method to use. See Details for options.

OrderAllToursFirst

Logical: If TRUE order all tours first and all retours last, which can be useful for multiple Strata in the same survey direction (e.g. a row of strata along a coast line).

Seed

Numeric: The seed to use when drawing the random starting point.

Margin

Numeric: The margin to use when iterating to fit the survey plan to the desired survey distance (including transport between segments). The function iterates until the survey distance is within Margin of the desired survey distance, and jumps out of the iteration after 100 tries or if not converging.

Value

An object of StoX data type SurveyPlan.

Details

The DefineSurveyPlan function generates the survey plan (transect lines) in a Cartesian coordinate system, and transforms the positions to the geographical coordinate system (longitude, latitude) using the azimuthal equal distance projection, which ensures that distances are preserved in the transformation.

The following types are implemented throught DefinitionMethod:

"Parallel"

"Parallel transects"

"ZigZagEqualSpacing"

"Equal space zigzag sampler, Strindberg and Buckland (2004). End transects are generated different from Strindberg and Buckland (2004), by mirroring the last transect around the line perpendicular to the survey direction passing through the last intersection point between the stratum border and the parallel lines used to generate the transects."

"ZigZagRectangularEnclosure"

"Rectangular enclosure zigzag sampler, Harbitz (2019)"

References

Strindberg, S., & Buckland, S. T. (2004). Zigzag survey designs in line transect sampling. Journal of Agricultural, Biological, and Environmental Statistics, 9, 443-461.

Harbitz, A. (2019). A zigzag survey design for continuous transect sampling with guaranteed equal coverage probability. Fisheries Research, 213, 151-159.

Examples

library(ggplot2)

stratumFile <- system.file(
  "testresources", 
  "strata_sandeel_2020_firstCoverage.wkt", package = "RstoxBase"
 )
stratumPolygon<- DefineStratumPolygon(
  DefinitionMethod = "ResourceFile", 
  FileName = stratumFile
)

# Harbitz zigzag survey design along each stratum:
surveyPlanZZ_Along <- DefineSurveyPlan(
  DefinitionMethod = "ZigZagRectangularEnclosure", 
  StratumPolygon = stratumPolygon, 
  SurveyTime = 200, 
  SurveySpeed = 10, 
  Seed = 1, 
  Bearing = "Along"
)

# Plot the stratumPolygon with the segments
ggplot() +
  geom_sf(data = stratumPolygon, aes(fill = StratumName), color = 'blue') +
  geom_segment(
    data = surveyPlanZZ_Along, 
    aes(x = LongitudeStart, y = LatitudeStart, xend = LongitudeEnd, yend = LatitudeEnd)
  )


# Harbitz zigzag survey design across each stratum:
surveyPlanZZ_Across<- DefineSurveyPlan(
  DefinitionMethod = "ZigZagRectangularEnclosure", 
  StratumPolygon = stratumPolygon, 
  SurveyTime = 200, 
  SurveySpeed = 10, 
  Seed = 1, 
  Bearing = "Across"
)
#> Warning: Sailed distance in stratum Vikingbanken did not converge to the desired sailed distance (101.366410666148 nmi). The closest used.
# Plot the stratumPolygon with the segments
ggplot() +
  geom_sf(data = stratumPolygon, aes(fill = StratumName), color = 'blue') +
  geom_segment(
    data = surveyPlanZZ_Across, 
    aes(x = LongitudeStart, y = LatitudeStart, xend = LongitudeEnd, yend = LatitudeEnd)
  )


# Parallel survey design across each stratum:
surveyPlanParallel_Across<- DefineSurveyPlan(
  DefinitionMethod = "Parallel", 
  StratumPolygon = stratumPolygon, 
  SurveyTime = 200, 
  SurveySpeed = 10, 
  Seed = 1, 
  Bearing = "Along"
)
# Plot the stratumPolygon with the segments
ggplot() +
  geom_sf(data = stratumPolygon, aes(fill = StratumName), color = 'blue') +
  geom_segment(
    data = surveyPlanParallel_Across, 
    aes(x = LongitudeStart, y = LatitudeStart, xend = LongitudeEnd, yend = LatitudeEnd)
  )