Learn R Programming

IceCast (version 2.1.0)

get_coords: Extract coordinates from a spatial object of lines and points

Description

Get coordinates from a spatial object of lines and points. There is no ordering of points returned. Note: This differs from extract_coords in that the ordering of the points is NOT considered.

Usage

get_coords(my_points)

Arguments

my_points

spatial object of type SpatialCollections, SpatialPoints, or SpatialLines

Value

n x 2 matrix of coordinates

Examples

Run this code
# NOT RUN {
#Load sample line
ex_line <- as(rm_holes(bg_water[2]), "SpatialLines")
get_coords(ex_line)
# }

Run the code above in your browser using DataLab