line_explode: Convert single polyline into multipolyline segments, based on...

Description Usage Arguments Value Author(s) Examples

View source: R/shapefile_utils.R

Description

Warning: This function is NOT robust. Poorly-ordered shapefiles can easily confused it! Plot the resulting object to ensure it has connected the lines properly. GIS programs (e.g., QGIS) have much more robust explode processes that will do much better job.

Usage

1
line_explode(polyline)

Arguments

polyline

sf polyline object

Value

sf multipolyline object

Author(s)

Leland Scantlebury

Examples

1
2
3
4
5
#-- Read in shapefiles
str <- read_sf(system.file("extdata", "MehlandHill2010_stream.shp", package = "pbjr"))

#-- Explode polyline
str <- line_explode(str)

scantle/pbjr documentation built on Dec. 22, 2021, 10:19 p.m.