Clip the beginning and ends SpatialLines to the edge of SpatialPolygon borders
Takes lines and removes the start and end point, to a distance determined by the nearest polygon border.
toptail_buff(l, buff, ...)
l |
An sf LINESTRING object |
buff |
An sf POLYGON object to act as the buffer |
... |
Arguments passed to rgeos::gBuffer() |
Other lines:
angle_diff()
,
geo_toptail()
,
is_linepoint()
,
line2df()
,
line2points()
,
line_bearing()
,
line_breakup()
,
line_match()
,
line_midpoint()
,
line_sample()
,
line_segment()
,
line_via()
,
mats2line()
,
n_sample_length()
,
n_vertices()
,
onewaygeo()
,
points2line()
,
toptailgs()
,
update_line_geometry()
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.