-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathline_midpoint.Rd
46 lines (45 loc) · 1.16 KB
/
line_midpoint.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linefuns.R
\name{line_midpoint}
\alias{line_midpoint}
\title{Find the mid-point of lines}
\usage{
line_midpoint(l, tolerance = NULL)
}
\arguments{
\item{l}{A spatial lines object}
\item{tolerance}{The tolerance used to break lines at verteces.
See \code{\link[lwgeom:st_linesubstring]{lwgeom::st_linesubstring()}}.}
}
\description{
Find the mid-point of lines
}
\examples{
l <- routes_fast_sf[2:5, ]
plot(l$geometry, col = 2:5)
midpoints <- line_midpoint(l)
plot(midpoints, add = TRUE)
# compare with sf::st_point_on_surface:
midpoints2 <- sf::st_point_on_surface(l)
plot(midpoints2, add = TRUE, col = "red")
}
\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_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}()},
\code{\link{toptail_buff}()}
}
\concept{lines}