Learn R Programming

od (version 0.5.1)

sfc_point_to_matrix: Extract coordinates from sfc objects with point geometry

Description

This functions takes point geometries with class sfc from the sf package and returns a matrix representing x and y (typically lon/lat) coordinates.

Usage

sfc_point_to_matrix(x)

Arguments

x

An sfc object

Author

Dave Cooley

Details

See https://github.com/dcooley/sfheaders/issues/52 for details

Examples

Run this code
sfc_point_to_matrix(od_data_centroids$geometry[1:6])

Run the code above in your browser using DataLab