R: sfc LINESTRING

sfc_linestring {sfheaders} | R Documentation

## sfc LINESTRING

### Description

constructs sfc of MULTIPOINT objects

### Usage

    sfc_linestring(
      obj = NULL,
      x = NULL,
      y = NULL,
      z = NULL,
      m = NULL,
      linestring_id = NULL
    )

### Arguments

`obj` | sorted matrix or data.frame
`x` | x geometry column
`y` | y geometry column
`z` | z geometry column
`m` | m geometry column
`linestring_id` | column of ids for linestrings

### Value

`sfc` object of LINESTRING 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

    x <- matrix( c(1:4), ncol = 2 )
    sfc_linestring( x )

    x <- data.frame( id = 1:2, x = 1:2, y = 2:1 )
    sfc_linestring( x )
    sfc_linestring( x, x = "x", y = "y" )
    sfc_linestring( x, x = "y", y = "x" )
    sfc_linestring( x, linestring_id = "id", x = "x", y = "y")

[Package sfheaders version 0.2.1 Index]