sfc_point: sfc POINT

Description Usage Arguments Value notes Examples

View source: R/sfc.R

Description

constructs sfc of POINT objects

Usage

1
sfc_point(obj, x = NULL, y = NULL, z = NULL, m = NULL)

Arguments

obj

sorted vector, matrix or data.frame

x

x geometry column

y

y geometry column

z

z geometry column

m

m geometry column

Value

sfc object of POINT geometries

notes

sfheaders functions do not perform any validity checks on the geometries. Nor do they set Coordinate Reference Systems, EPSG, PROJ4 or precision attributes.

The data.frame and matrices you send into the sfheader functions must be ordered.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x <- c(1:3)
sfc_point( x )

x <- matrix( c(1:10) , ncol = 2 )
sfc_point( x )

x <- setNames( as.data.frame( x ), c("x","y") )
sfc_point( x )
sfc_point( obj = x, x = "x", y = "y" )
sfc_point( obj = x, x = "y", y = "x" )

sfheaders documentation built on Dec. 1, 2020, 1:07 a.m.