This function computes Euclidean distance along points aligned to a given gradient (e.g. elevation).

dist.along.grad(coords, var, grad.order, grad.scaled.min, grad.scaled.max)

Arguments

coords

a matrix of x and y coordinates in some projected coordinate system

var

a vector of the same length as coords, describing the gradient of interest

vector of integers that define ordering of coordinates along gradient

min value of rescaled gradient values

max value of rescaled gradient values

Details

This function is primarily intended for use within plotTransect.

Value

A data.frame object:

scaled.distance

cumulative distance, scaled to the interval of 0.5, nrow(coords) + 0.5

distance

cumulative distance computed along gradient, e.g. transect distance

variable

x

x coordinates, ordered by gradient values

y

y coordinate, ordered by gradient values

a vector index describing the sort order defined by gradient values

D.E. Beaudette

Note

This function is very much a work in progress, ideas welcome.

plotTransect