Learn R Programming

rsgeo (version 0.1.7)

bearing_geodesic: Calculate Bearing

Description

Calculates the bearing between two point geometries.

Usage

bearing_geodesic(x, y)

bearing_haversine(x, y)

Value

A vector of doubles of the calculated bearing for between x and y

Arguments

x

an object of class rs_POINT

y

an object of class rs_POINT

Examples

Run this code
x <- geom_point(runif(10, 0, 90), rnorm(10, 1, 90))
y <- geom_point(runif(10, 0, 90), rnorm(10, 1, 90))
bearing_geodesic(x, y)
bearing_haversine(x, y)

Run the code above in your browser using DataLab