View source: R/ECSAS.create.transects.R
ECSAS.create.transects | R Documentation |
This function aggregates consecutive ECSAS watches into transects.
ECSAS.create.transects(
dat,
angle.thresh = NULL,
max.lag = 10,
ignore_empty_dir = FALSE,
debug = FALSE,
CRS = NULL,
debug.watch = NULL
)
dat |
a dataframe of ECSAS watches (1 row per watch). |
angle.thresh |
(default 90 degrees) changes in direction of more than this are considered to start new transects (currently not implemented) |
max.lag |
(default 10 minutes) the maximum time lag allowed between
consecutive watches to be considered part of the same transect. Watches
are sorted by |
ignore_empty_dir |
logical (default FALSE) should watches with a PlatformDir
that is either empty or "no direction" (ie. 1 - see table |
debug |
logical (default FALSE), should the debugger, |
CRS |
if not null, the output coordinate system will be set CRS via
|
debug.watch |
watchid to stop at in for loop if debug is true |
Combine watches in dat
into transects and return a SpatialLinesDataFrame.
A transect is defined as all consecutive watches
by the same observer on the same vessel in the same direction on the same day.
Rows in dat
must contain at least columns named ObserverName
,
PlatformDir
, PlatformName
, Date
, StartTime
,
EndTime
, LatStart
, LongStart
, LatEnd
,
LongEnd
as returned by ECSAS.extract()
.
Watches are sorted by ObserverName
, PlatformName
, Date
,
and StartTime
, and thus any errors in these will result in erroneous
transects.
LatEnd
and
LongEnd
are only necessary for the last watch in each transect to
provide it's endpoint. If either is NA
, the end point will be projected
along a loxodrome starting at the watch start location in the direction of PlatformDir
(or
PlatformDirDeg
if it exists), based on PlatformSpeed
(in knots),
and ObsLen
(in minutes).
If PlatformDirDeg
or PlatformDir
is missing or "no direction"
and ignore_empty_dir
is TRUE
, then the point is projected to the
north. If either of PlatformSpeed
or ObsLen
is missing then
an error is produced.
Dave Fifield
ECSAS.extract
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.