R: sfg linestring

sfg_linestring {sfheaders} | R Documentation

## sfg linestring

### Description

constructs sfg LINESTRING object

### Usage

    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

    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" )

[Package sfheaders version 0.2.1 Index]