Skip to contents

This function returns a data frame with fx and fy and tx and ty variables representing the beginning and end points of spatial line features respectively.

Usage

line2df(l)

Arguments

l

A spatial lines object

Examples

line2df(routes_fast_sf[5:6, ]) # beginning and end of routes
#> # A tibble: 2 × 5
#>      L1    fx    fy    tx    ty
#>   <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1     1 -1.52  53.8 -1.51  53.8
#> 2     2 -1.52  53.8 -1.52  53.8