Learn R Programming

rsgeo (version 0.1.7)

explode_lines: Explode Lines

Description

Given a LineString or MultiLineString, expand the geometry into each and every component Line.

Usage

explode_lines(x)

Value

an object of class rs_LINESTRING

Arguments

x

an object of class rs_LINESTRING or rs_MULTILINESTRING

Details

A LineString is composed of one or more Lines. A Line is a connected by a start and end coordinate only.

Examples

Run this code
x <- geom_linestring(1:10, 10:1)
length(x)
explode_lines(x)

Run the code above in your browser using DataLab