extract_coords: Function to extract coordinates.

Description Usage Arguments Value Examples

Description

Function to extract coordinates from a SpatialLines object. If there are breaks in the line, this function connects the closest points to create one line. Note: This differs from the function getCoords in that the ordering of the points is considered.

Usage

1

Arguments

x

SpatialLines or SpatialPolygons object

Value

n x 2 matrix of coordinates

Examples

1
2
3
4
coords <- extract_coords(reg_info$regions[[3]])
par(mfrow = c(1, 2))
plot(reg_info$regions[[3]], main = "Polygon Object")
plot(coords, type = "p", main = "Coordinates", pch = 20)

IceCast documentation built on June 24, 2019, 9:03 a.m.