sfg_linestring: sfg linestring

Description Usage Arguments Value Examples

View source: R/sfg.R

Description

constructs sfg LINESTRING object

Usage

1
sfg_linestring(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 LINESTRING geometry

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sfg_linestring( 1:2 )
sfg_linestring( 1:3 )
sfg_linestring( 1:4 )

sfg_linestring( matrix( 1:24, ncol = 2 ) )
sfg_linestring( matrix( 1:24, ncol = 3 ) )
sfg_linestring( matrix( 1:24, ncol = 4 ) )

sfg_linestring( matrix( 1:24, ncol = 4 ), x = 3, y = 2, z = 3)

sfg_linestring( data.frame( x = 1:10, y = 11:20 ) )
sfg_linestring( data.frame( x = 1:10, y = 11:20, z = 21:30 ) )
sfg_linestring( data.frame( x = 1:10, y = 11:20, z = 21:30 ), x = "x", y = "z" )

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