Last chance! 50% off unlimited learning
Sale ends in
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.
line2df(l)
A spatial lines object
Other lines: angle_diff
,
geo_toptail
, is_linepoint
,
line_bearing
, line_match
,
line_midpoint
, line_sample
,
line_segment
, line_via
,
mats2line
, n_sample_length
,
n_vertices
, onewaygeo
,
onewayid
, points2line
,
toptail_buff
, toptailgs
,
update_line_geometry
# NOT RUN {
data(flowlines)
line2df(flowlines[5, ]) # beginning and end of a single straight line
line2df(flowlines) # on multiple lines
line2df(routes_fast[5:6, ]) # beginning and end of routes
line2df(routes_fast_sf[5:6, ]) # beginning and end of routes
# }
Run the code above in your browser using DataLab