Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gcDestination

Find destination in geographical coordinates


Description

Find the destination in geographical coordinates at distance dist and for the given bearing from the starting point given by lon and lat.

Usage

gcDestination(lon, lat, bearing, dist, dist.units = "km",
 model = NULL, Vincenty = FALSE)

Arguments

lon

longitude (Eastings) in decimal degrees (either scalar or vector)

lat

latitude (Northings) in decimal degrees (either scalar or vector)

bearing

bearing from 0 to 360 degrees (either scalar or vector)

dist

distance travelled (scalar)

dist.units

units of distance "km" (kilometers), "nm" (nautical miles), "mi" (statute miles)

model

choice of ellipsoid model ("WGS84", "GRS80", "Airy", "International", "Clarke", "GRS67"

Vincenty

logical flag, default FALSE

Details

The bearing argument may be a vector when lon and lat are scalar, representing a single point.

Value

A matrix of decimal degree coordinates with Eastings in the first column and Northings in the second column.

Author(s)

Eric Archer and Roger Bivand

References

the file earlier available at http:\/\/williams.best.vwh.net/avform.htm,

Vincenty, T. 1975. Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations. Survey Review 22(176):88-93

See Also

Examples

data(state)
res <- gcDestination(state.center$x, state.center$y, 45, 250, "km")
plot(state.center$x, state.center$y, asp=1, pch=16)
arrows(state.center$x, state.center$y, res[,1], res[,2], length=0.05)
llist <- vector(mode="list", length=length(state.center$x))
for (i in seq(along=llist)) llist[[i]] <- gcDestination(state.center$x[i],
  state.center$y[i], seq(0, 360, 5), 250, "km")
plot(state.center$x, state.center$y, asp=1, pch=3)
nll <- lapply(llist, lines)

maptools

Tools for Handling Spatial Objects

v1.1-1
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Nicholas Lewin-Koh [aut], Edzer Pebesma [ctb], Eric Archer [ctb], Adrian Baddeley [ctb], Nick Bearman [ctb], Hans-Jörg Bibiko [ctb], Steven Brey [ctb], Jonathan Callahan [ctb], German Carrillo [ctb], Stéphane Dray [ctb], David Forrest [ctb], Michael Friendly [ctb], Patrick Giraudoux [ctb], Duncan Golicher [ctb], Virgilio Gómez Rubio [ctb], Patrick Hausmann [ctb], Karl Ove Hufthammer [ctb], Thomas Jagger [ctb], Kent Johnson [ctb], Matthew Lewis [ctb] (<https://orcid.org/0000-0003-2244-4078>), Sebastian Luque [ctb], Don MacQueen [ctb], Andrew Niccolai [ctb], Edzer Pebesma [ctb], Oscar Perpiñán Lamigueiro [ctb], Ethan Plunkett [ctb], Ege Rubak [ctb] (<https://orcid.org/0000-0002-6675-533X>), Tom Short [ctb], Greg Snow [ctb], Ben Stabler [ctb], Murray Stokely [ctb], Rolf Turner [ctb]
Initial release
2021-03-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.