Skip to contents

Take data contained in one sf LINESTRING object and attaches it to a network. Values are averaged or combined where appropriate. Take care with ID numbers or coded data that may appear numeric, but is not meant to be combined or averaged.

Usage

AttachData(
  shape,
  refshape,
  weight.type = 1,
  fields = "all",
  logical = F,
  tolerance = 100
)

Arguments

shape

A sfnetwork or sf object with LINESTRING geometry to attach data to

refshape

A sf object with LINESTRING geometry that contains the desired data

weight.type

interger indicating which weight type is to be used; see details

fields

A character vector with the names of the columns to attach, or "all"

logical

T/F determining how to handle logical values

tolerance

A number used when matching lines that are not perfectly aligned

Value

A sfnetwork consisting of the original shape with data attached now