constructs sfg POINT object

sfg_point(obj, x = NULL, y = NULL, z = NULL, m = NULL)

Arguments

obj

matrix or data.frame

x

x geometry column

y

y geometry column

z

z geometry column

m

m geometry column

Value

sfg object of POINT geometry

Examples

sfg_point( 1:2 )
#> [1] 1 2 #> attr(,"class") #> [1] "XY" "POINT" "sfg"
sfg_point( 1:3 )
#> [1] 1 2 3 #> attr(,"class") #> [1] "XYZ" "POINT" "sfg"
sfg_point( 1:4 )
#> [1] 1 2 3 4 #> attr(,"class") #> [1] "XYZM" "POINT" "sfg"
sfg_point( matrix( 1:3, ncol = 3 ) )
#> [1] 1 2 3 #> attr(,"class") #> [1] "XYZ" "POINT" "sfg"
sfg_point( data.frame( x = 1, y = 2, z = 3 ) )
#> [1] 1 2 3 #> attr(,"class") #> [1] "XYZ" "POINT" "sfg"
sfg_point( data.frame( x = 1, y = 2, z = 3 ), x = "x", y = "y" )
#> [1] 1 2 #> attr(,"class") #> [1] "XY" "POINT" "sfg"
sfg_point( data.frame( x = 1, y = 2, z = 3 ), x = 1, y = 3 )
#> [1] 1 3 #> attr(,"class") #> [1] "XY" "POINT" "sfg"