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

make_step_geom(group, time, geometry)

Arguments

group

a c_grouping object

time

sft_timestamp class with start and end date

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")) group <- list(id = rep(1, 4)) time <- 1:4 cg <- make_c_grouping(group) make_step_geom( group = cg, geometry = geom$geometry, time = time )
#> Geometry set for 4 features #> Geometry type: GEOMETRY #> Dimension: XY #> Bounding box: xmin: 1 ymin: 0 xmax: 5 ymax: 7 #> CRS: NA
#> LINESTRING (1 0, 2 1)
#> LINESTRING (2 1, 2 5)
#> LINESTRING (2 5, 5 7)
#> POINT (5 7)