line2df: Convert geographic line objects to a data.frame with from and...

View source: R/od-funs.R

line2dfR Documentation

Convert geographic line objects to a data.frame with from and to coords

Description

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

See Also

Other lines: angle_diff(), geo_toptail(), is_linepoint(), line2points(), line_bearing(), line_breakup(), line_midpoint(), line_segment(), line_via(), mats2line(), n_vertices(), onewaygeo(), points2line(), toptail_buff()

Examples

line2df(routes_fast_sf[5:6, ]) # beginning and end of routes

stplanr documentation built on Sept. 15, 2023, 9:07 a.m.