linedf2SpatialLines: linedf2SpatialLines

Description Usage Arguments Examples

Description

This function converts a dataframe of IDs and coordinates into a SpatialLines object of the package "sp".

Usage

1

Arguments

linedf

a data frame with the following columns: id = generic ids of the lines, fx = coordinates x of the first point of the line, fy = coordinates y of the first point of the line, tx = coordinates x of the second point of the line, tx = coordinates y of the second point of the line.

Examples

1
2
3
4
library("sp", "sptools")
sl = linedf2SpatialLines(data.frame(id=1, fx=0, fy=0, tx=2, ty=2))
class(sl)
plot(sl)

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