Learn R Programming

geoprofiler (version 0.0.3)

profile_azimuth: Azimuth Between Profile Points

Description

Azimuth Between Profile Points

Usage

profile_azimuth(x)

Value

Azimuth as units object

Arguments

x

sf point object. First point marks the start point.

Details

If only two points are given, the azimuth is calculated using triangulation from the tectonicr package. If more than two points are given, the azimuth is calculated using linear interpolation in the coordinate reference frame given by profile.

See Also

profile_length()

Examples

Run this code
p1 <- data.frame(lon = -90.8, lat = 48.6) |>
  sf::st_as_sf(coords = c("lon", "lat"), crs = "WGS84")

profile_points(p1,
  profile.azimuth = 135, profile.length = 10000,
  crs = sf::st_crs("EPSG:26915")
) |>
  profile_azimuth()

Run the code above in your browser using DataLab