PointsAlong: Find spaced Points along a line

Description Usage Arguments Details Value Author(s) Examples

Description

find evenly spaced points along a line

Usage

1
PointsAlong(x, y, spacing = NULL, N = 1, endtol = 0.1)

Arguments

x

x-coordinates

y

y-coordinates

spacing

spacing of points

N

number of points

endtol

indent on either ends

Details

The total length is returned: this is the line integral along the trace.

Value

List:

x

x-coordinates

y

y-coordinates

rot

angle at the points

TOT

total length along the trace

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu

Examples

1
2
3
4
5
6
7
8
9
plot(c(-5,5), c(-5,5), asp=1, type='n' )
ff=list()
ff$x=c(-4.850,-4.700,-3.934,-2.528, 0.603, 2.647, 3.861, 2.626)
ff$y=c(-4.045,-2.087,-0.710, 0.172, 1.291, 2.087,-0.753,-4.131)

g = PointsAlong(ff$x, ff$y, N=20)

lines(ff$x, ff$y)
points(g$x, g$y)

GEOmap documentation built on May 2, 2019, 8:56 a.m.