-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathtoptail_buff.Rd
49 lines (47 loc) · 1.25 KB
/
toptail_buff.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/toptail.R
\name{toptail_buff}
\alias{toptail_buff}
\title{Clip the beginning and ends of \code{sf} LINESTRING objects}
\usage{
toptail_buff(l, buff, ...)
}
\arguments{
\item{l}{An \code{sf} object representing lines}
\item{buff}{An \code{sf} object with POLYGON geometry to buffer the linestring.}
\item{...}{Arguments passed to \code{sf::st_buffer()}}
}
\description{
Takes lines and removes the start and end point, to a distance determined
by the nearest \code{buff} polygon border.
}
\examples{
l <- routes_fast_sf
buff <- zones_sf
r_toptail <- toptail_buff(l, buff)
nrow(l)
nrow(r_toptail)
plot(zones_sf$geometry)
plot(l$geometry, add = TRUE)
plot(r_toptail$geometry, lwd = 5, add = TRUE)
}
\seealso{
Other lines:
\code{\link{angle_diff}()},
\code{\link{geo_toptail}()},
\code{\link{is_linepoint}()},
\code{\link{line2df}()},
\code{\link{line2points}()},
\code{\link{line_bearing}()},
\code{\link{line_breakup}()},
\code{\link{line_midpoint}()},
\code{\link{line_segment}()},
\code{\link{line_segment1}()},
\code{\link{line_via}()},
\code{\link{mats2line}()},
\code{\link{n_segments}()},
\code{\link{n_vertices}()},
\code{\link{onewaygeo}()},
\code{\link{points2line}()}
}
\concept{lines}