dist2gcS: dist2gcs

Description Usage Arguments Details Value Examples

Description

Should not be called directly by users. Copied and adapted from function "dist2gc" in geosphere package by Robert Hijmans. dist2gcs calculates signed distance between point and a line.

Usage

1
dist2gcS(p1, p2, p3, r = 6378137)

Arguments

p1

Start of great circle path. longitude/latitude of point(s).

p2

End of great circle path. As above.

p3

Point away from the great cricle path. As for p2.

r

radius of the earth; default = 6378137.

Details

Just took out "abs" from original code in geosphere::dist2gc. So returns signed values to indicate left or right, as used by makelado.

Value

Signed distance between point and line i.e. cross track distance.

Examples

1
2
3
4
5
## Not run: 
dist2gcs(c(0,0),c(90,90),c(80,80)
dist2gcs(c(0,0),c(90,90),c(-80,80))

## End(Not run)

darrennorris/parcelareadev documentation built on May 14, 2019, 6:11 p.m.