Description Usage Arguments Details Value Examples
View source: R/read-transects.R
Read transects from admitted file formats by sf::st_read function, and prepare the data for analysis workflows.
1 2 3 4 5 6 7 | read_transect(x, ...)
## S3 method for class 'character'
read_transect(x, start_from = NULL, ...)
## S3 method for class 'sf'
read_transect(x, start_from = NULL, ...)
|
x |
object of class |
... |
other arguments passed to sf::st_read. |
start_from |
character; |
If x
is a character string, it must be the path to
an external data source (e.g. a file of line geometries). If x
is
an object of class sf
, it must contains geometries of type
LINESTRING
or MULTILINESTRING
.
A transect consists of one line comprised by two vertices, the first of which must be digitized landward. Currently, the function only accepts LINESTRING or MULTILINESTRING in projected coordinate systems (e.g. EPSG:32619).
An object of class transect, which inherits both 'sf' and 'data.frame'
classes, containing a coastr_id
.
1 2 | (file_path <- system.file('extdata', 'transects-long.geojson', package = 'coastr'))
(transect <- read_transect(file_path, start_from = 'N'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.