make_step_geom: Calculate step geometries given a set of groupings, time, and...

View source: R/step_calculation.R

make_step_geomR Documentation

Calculate step geometries given a set of groupings, time, and geometries

Description

This calculates step geometries as individual line segments based on the active_group

Usage

make_step_geom(group, time_data, geometry)

Arguments

group

a c_grouping object

time_data

time vector

geometry

the geometery data from either sf or sf_track. Must be an sf geometry class

Examples

#'
library("sf")
geom <- st_as_sf(data.frame(
  x = c(1, 2, 2, 5),
  y = c(0, 1, 5, 7)
), coords = c("x", "y"))

burst <- list(id = rep(1, 4))
time <- 1:4

cg <- make_c_grouping(burst)

make_step_geom(
  group = cg,
  geometry = geom$geometry,
  time_data = time
)

sftrack documentation built on March 31, 2023, 7:27 p.m.