SpatialLines2df: SpatialLines2df

Description Usage Arguments Examples

Description

This function extracts the coordinates of the start and end points of each segment of a Spatial Line and returns a dataframe.

Usage

1
SpatialLines2df(spatial_line)

Arguments

spatial_line

An object class SpatialLinesDataFrame from the package sp.

Examples

1
2
3
4
5
library("sp","sptools")
c1 = cbind(c(0,2), c(0,2))
l1 = Line(c1)
sl = list(Lines(list(l1), ID = 1))
SpatialLines2df(SpatialLines(sl))

duccioa/sptools documentation built on May 3, 2019, 1:48 p.m.