Learn R Programming

stplanr (version 0.1.0)

line2points: Convert a SpatialLinesDataFrame to points at the origin and destination

Description

Convert a SpatialLinesDataFrame to points at the origin and destination

Usage

line2points(l)

Arguments

l
A SpatialLinesDataFrame

Examples

Run this code
data(routes_fast)
lpoints <- line2points(routes_fast[2,]) # for a single line
data(flowlines) # load demo flowlines dataset
lpoints <- line2points(flowlines) # for many lines
plot(lpoints) # note overlapping points

Run the code above in your browser using DataLab