powered by
Add vertices (SpatialPoints) to their nearest lines (SpatialLines), may fail if the line geometries are self intersecting.
add_vertices_lines(lines, points, nearest_lines_idx, mindist)
The SpatialLinesDataframe to modify
The SpatialPoints to add to as vertex to the lines
For each point, the index of the nearest line
The minimum distance between one point and the extremity of the line to add the point as a vertex.
An object of class SpatialLinesDataFrame (package sp)
# NOT RUN { #This is an internal function, no example provided # }
Run the code above in your browser using DataLab