add_vertices_lines: Add vertices to a SpatialLinesDataFrame

Description Usage Arguments Value Examples

View source: R/geometrical_functions.R

Description

Add vertices (SpatialPoints) to their nearest lines (SpatialLines), may fail if the line geometries are self intersecting.

Usage

1
add_vertices_lines(lines, points, nearest_lines_idx, mindist)

Arguments

lines

The SpatialLinesDataframe to modify

points

The SpatialPoints to add to as vertex to the lines

nearest_lines_idx

For each point, the index of the nearest line

mindist

The minimum distance between one point and the extremity of the line to add the point as a vertex.

Value

An object of class SpatialLinesDataFrame (package sp)

Examples

1
#This is an internal function, no example provided

spNetwork documentation built on Oct. 30, 2021, 5:06 p.m.