Splits lines longer than a given threshold into the minimum number of pieces to all be under the given threshold.

split_lines(input_lines, max_length, id = "ID")

Arguments

max_length

maximum segment length to return

id

name of ID column in data.frame

Value

only the split lines.

Details

Split lines into smaller segments

Taken from https://gist.github.com/dblodgett-usgs/cf87392c02d73f1b7d16153d2b66a8f3