make_segments_isdb: make_segments_isdb

View source: R/make_segments_isdb.r

make_segments_isdbR Documentation

make_segments_isdb

Description

This function takes a df of the isdb data, and creates line segments for each distinct FISHSET_ID. If specified, it will generate spatial layers within a gpkg file. Each line will have the following columns in the resulting data frame:

  • FISHSET_ID This uniquely identifies a set

  • LEN_KM This field shows the calculated distance of the resultant line in kms

  • SET_NO This uniquely identifies a set

  • N_VALID_VERT This field shows how many vertices appear correct after NAs, 0s and other problematic values have been dropped

  • SETSTART This is the earliest time associated with a set

  • SETEND This is the last time associated with a set

  • SET_DUR This is the difference in time (in hours) between the first and last position of a set

Usage

make_segments_isdb(isdb.df, filename = NULL, create.spatial = TRUE)

Arguments

isdb.df

This is the dataframe you want to plot. isdb dataframes are characterized by the existence of one of the following sets of fields: ISSETPROFILE_WIDE - based:

  • FISHSET_ID

  • SET_NO

  • LAT1, LONG1 and DATE_TIME1

  • LAT2, LONG2 and DATE_TIME2

  • LAT3, LONG3 and DATE_TIME3

  • LAT4, LONG4 and DATE_TIME4

or ISSETPROFILE - based

  • FISHSET_ID

  • SET_NO

  • LATITUDE, LONGITUDE, DATETIME and PNTCD_ID

filename

default is NULL. If you are outputting shapefiles, you can specify a name for them here. They will also get a timestamp.

create.spatial

default is TRUE. This indicates whether or not to create a gpkg file in your working directory.

Author(s)

Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca


Maritimes/Mar.utils documentation built on Feb. 12, 2024, 11:38 p.m.