constructs sfg POINT object
sfg_point(obj, x = NULL, y = NULL, z = NULL, m = NULL)
matrix or data.frame
x geometry column
y geometry column
z geometry column
m geometry column
sfg
object of POINT geometry
sfg_point( 1:2 )
#> [,1] [,2]
#> [1,] 1 2
#> attr(,"class")
#> [1] "XY" "POINT" "sfg"
sfg_point( 1:3 )
#> [,1] [,2] [,3]
#> [1,] 1 2 3
#> attr(,"class")
#> [1] "XYZ" "POINT" "sfg"
sfg_point( 1:4 )
#> [,1] [,2] [,3] [,4]
#> [1,] 1 2 3 4
#> attr(,"class")
#> [1] "XYZM" "POINT" "sfg"
sfg_point( matrix( 1:3, ncol = 3 ) )
#> [,1] [,2] [,3]
#> [1,] 1 2 3
#> attr(,"class")
#> [1] "XYZ" "POINT" "sfg"
sfg_point( data.frame( x = 1, y = 2, z = 3 ) )
#> [,1] [,2] [,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] [,2]
#> [1,] 1 2
#> attr(,"class")
#> [1] "XY" "POINT" "sfg"
sfg_point( data.frame( x = 1, y = 2, z = 3 ), x = 1, y = 3 )
#> [,1] [,2]
#> [1,] 1 3
#> attr(,"class")
#> [1] "XY" "POINT" "sfg"