Defines transects through parameters that can be used to generate a transect design using the function TransectDesign.

DefineTransectParameter(
  processData,
  UseProcessData = FALSE,
  DefinitionMethod = c("Parameter", "ParameterTable", "ResourceFile"),
  StratumPolygon,
  StratumNames = character(),
  TransectType = c("Parallel", "ZigZagRectangularEnclosure", "ZigZagEqualSpacing"),
  Bearing = c("Along", "Across", "AlongReversed", "AcrossReversed"),
  BearingAngle = numeric(),
  Retour = FALSE,
  SurveyTime = numeric(),
  SurveyDistance = numeric(),
  SurveySpeed = numeric(),
  Seed = numeric(),
  ParameterTable = data.table::data.table(),
  FileName = character()
)

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, one of the three options "Parameter", for specifying common parameters for all strata given by StratumNames; "ParameterTable", for specifying individual parameters for each stratum in the table ParameterTable; and "ResourceFile", for reading the ParameterTable from a the file given by FileName.

StratumPolygon

The StratumPolygon process data.

StratumNames

Character: The names of the strata to include in the transect design. Defaults to all strata.

TransectType

Character: The name of the type of survey design to create, one of "Parallel", "ZigZagEqualSpacing" and "ZigZagRectangularEnclosure" (see details).

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 transect design will be doubled by a retour.

SurveyTime

Numeric: The time to spend in the stratum including transport between segments, given in hours. Specifying the SurveyTime requires the SurveySpeed to be given as well. Note that the resulting accumulated time may not be exactly equal to SurveyTime.

SurveyDistance

Numeric: The distance to travel in the stratum including transport between segments, given in nautical miles. The SurveyDistance has precedence over SurveyTime. Note that the resulting accumulated distance may not be exactly equal to SurveyDistance.

SurveySpeed

Numeric: The speed of the vessel, needed if effort is specified by SurveyTime.

Seed

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

ParameterTable

A table specifying the parameters for each stratum to create transect design for. See the Details for a list of required columns.

FileName

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

Value

An object of StoX data type TransectParameter.

Details

If the ParameterTable is given the table must contain the following columns:

"StratumName"

The name of the stratum, which will be matched against the names of the strata in the StratumPolygon

"TransectType"

See the argument TransectType

"Bearing"

See the argument Bearing

"BearingAngle"

If given, this overrides Bearing. See the argument BearingAngle

"Retour"

See the argument Retour

"SurveyTime"

See the argument SurveyTime

"SurveyDistance"

Overrides the SurveyTime. See the argument SurveyDistance

"SurveySpeed"

See the argument SurveySpeed

"Seed"

See the argument Seed

The following types are implemented through TransectType:

"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)

Examples


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

parameterTable <- DefineTransectParameter(
 DefinitionMethod = "Parameter", 
 TransectType = "ZigZagRectangularEnclosure", 
  StratumPolygon = stratumPolygon, 
  SurveyTime = 200, 
  SurveySpeed = 10, 
  Seed = 1, 
  Bearing = "Along"
)

print(parameterTable)
#>                StratumName               TransectType Bearing Retour SurveyTime
#>                     <char>                     <char>  <char> <lgcl>      <num>
#>  1:           AlbjoernLing ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  2:  Engelsk_Klondyke_2020 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  3:  Inner_Shoal_East_2016 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  4: Inner_Shoal_North_2020 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  5:  Inner_Shoal_West_2018 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  6:              Nordgyden ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  7:         Ostbanken_2020 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  8:     Outer_Shoal_2020_1 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>  9:    VestbankenSouthEast ZigZagRectangularEnclosure   Along  FALSE   16.66667
#> 10:    VestbankenSouthWest ZigZagRectangularEnclosure   Along  FALSE   16.66667
#> 11:  Vestbanken_North_2020 ZigZagRectangularEnclosure   Along  FALSE   16.66667
#> 12:           Vikingbanken ZigZagRectangularEnclosure   Along  FALSE   16.66667
#>     SurveySpeed    Seed
#>           <num>   <int>
#>  1:          10  856018
#>  2:          10 1343338
#>  3:          10 4835079
#>  4:          10 4732495
#>  5:          10 6841049
#>  6:          10 7168485
#>  7:          10 6920574
#>  8:          10 5779372
#>  9:          10 4548938
#> 10:          10 2729382
#> 11:          10 5446563
#> 12:          10 7245204