points2line: Convert a series of points, or a matrix of coordinates, into...

Description Usage Arguments Examples

View source: R/od-funs.R

Description

This is a simple wrapper around spLines() that makes the creation of SpatialLines objects easy and intuitive

Usage

1

Arguments

p

A SpatialPoints obect or matrix representing the coordinates of points.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
p <- matrix(1:4, ncol = 2)
library(sp)
l <- points2line(p)
plot(l)
l <- points2line(cents)
plot(l)
p <- line2points(routes_fast)
l <- points2line(p)
plot(l)
l_sf <- points2line(cents_sf)
plot(l_sf)

stplanr documentation built on Oct. 20, 2018, 5:05 p.m.