I have 2 distinct spatial objects:
- on one hand I have a SpatialLinesDataFrame
- on the other hand I have a SpatialPointsDataFrame
Considering one line and one point that intersects that line, I would like to split the line into two segments according to the point.
The point is fixed and does intersect the line, the following command from the rgeos package
gIntersects(line.shp,point.shp)
returns TRUE.
A similar question has been asked here but the answer is based on the st_split function. However, this function is no longer implemented in the latest version of the sf package (version 0.7-3).
st_split
now in thelwgeom
package?lwgeom
package and in deed the function is inside. Thanks for the tip