Learn R Programming

spNetwork (version 0.1.1)

add_vertices: Add vertices to a single line

Description

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

Usage

add_vertices(line, points, i, mindist)

Arguments

line

The SpatialLine to modify

points

The SpatialPoints to add to as vertex to the lines

i

The index of the line (for recombining after all lines)

mindist

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

Value

A matrix of coordinates to build the new line

Examples

Run this code
# NOT RUN {
#This is an internal function, no example provided
# }

Run the code above in your browser using DataLab