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

Description Usage Arguments Examples

View source: R/od-funs.R

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

1

Arguments

l

A spatial lines object

Examples

1
2
3
4
5
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

stplanr documentation built on Jan. 7, 2019, 5:04 p.m.