near.train: Distance from all points to the nearest train line

Description Usage Arguments Details

View source: R/near.train.R

Description

Measures euclidean distance from each point to the nearest trainline

Usage

1
near.train(dataset, trainline.psp, trainline.p4s)

Arguments

dataset

a merged gps/accelerometer dataset

trainline.psp

a psp (line segement pattern from the package spatstat) of train lines

trainline.p4s

the proj4string of the trainline

Details

We assume you have processed accelerometer data using the process.acc and gps.acc.merge. This function then takes train line data, in psp format, and uses the nncross function from the spatstat package to measure distance from each point to the nearest train line.

To find out the proj4string of the trainline data, use package sp function proj4string on a SpatialLinesDataFrame of train data


dprocter/modeid documentation built on May 19, 2019, 8:21 a.m.