nds_create_lines: Create a sf object using the linestring geometry

View source: R/nds_create.R

nds_create_linesR Documentation

Create a sf object using the linestring geometry

Description

This function creates a sf object using the linestring geometry, based on the NDS-BR naturalistic data (see nds_load_data).

Usage

nds_create_lines(data, x, y, valid = "all")

Arguments

data

A data.frame or tibble object with coordinates.

x

Data attribute with x coordinates.

y

Data attribute with y coordinates.

valid

Option to select all data or valid data ("all", "yes").

Details

nds_create_lines takes the naturalistic data as input and creates a linestring spatial object. x and y arguments considers longitude and latitude, respectively. It is possible to filter only valid time data using the valid parameter, based on the VALID_TIME attribute. In it's default, the function transforms all data, including invalid times.

Value

A sf object with linestring geometry.

See Also

nds_create_points

Examples

path <- system.file("extdata", package = "ndsbr")
nds_data <- nds_load_data("driver", path)
nds_create_lines(nds_data, x = LONG, y = LAT)


pabsantos/ndsbr documentation built on June 13, 2024, 3:47 a.m.