cl_Transect: Extracts a transect from data returned by function...

Description Usage Arguments Value Examples

View source: R/cl_Transect.R

Description

When it is operated with type "Area" function cl_GetData() returns data at all available points of a geographic area; function cl_Transect() extract a transect inside this area in 2 steps;

output of this function has the same structure as output of function cl_GetData() and may be plotted by function cl_PlotData()

Usage

1
cl_Transect(x, vertices, plt = FALSE)

Arguments

x

: [list] a list returned by function cl_GetData() whose field type has value "Area"

vertices

: [list] a polygonal line that represents a transect; each element of this list is a geographic point, i.e. a vector of length 2 (longitude, latitude);

plt

: [logical] make a plot of the transect on the maps of the variables (default is FALSE)

Value

: [list] a list with 5 components :

Examples

1
2
3
4
5
6
gabes <- cl_GetData(lon = c(10, 14), lat = c(32.5, 36), dir = "./CoastalLight.d")
vertices <- list(c(10.1,33), c(13.5,35), c(13,34))
#X11()
par(mfrow = c(3, 2))
tr <- cl_Transect(gabes, vertices, plt = TRUE)
cl_PlotData(tr)

jpgattuso/CoastalLight documentation built on June 25, 2021, 5:34 p.m.