line_azimuth {tectonicr}R Documentation

Extract azimuths of line segments

Description

Extract azimuths of line segments

Usage

line_azimuth(x)

lines_azimuths(x)

Arguments

x

sf object of type "LINESTRING" or "MULTILINESTRING"

Details

It is recommended to perform line_azimuth() on single line objects, i.e. type "LINESTRING", instead of "MULTILINESTRING". This is because the azimuth of the last point of a line will be calculated to the first point of the next line otherwise. This will cause a warning message. For MULTILINESTRING objects, use lines_azimuths().

Value

sf object of type "POINT" with the columns and entries of the first row of x

Examples

data("plates", package = "tectonicr")
subset(plates, pair == "af-eu") |>
  smoothr::densify() |>
  line_azimuth()

line_azimuth(plates)

[Package tectonicr version 0.2.95 Index]