ox_bearings: Compute edge compass bearings

View source: R/metrics.R

ox_bearingsR Documentation

Compute edge compass bearings

Description

Initial compass bearing (degrees clockwise from north) of each edge, from its first to its last coordinate. Geographic coordinates are used; projected graphs are transformed to EPSG:4326 first.

Usage

ox_bearings(g)

Arguments

g

An osm_graph.

Value

A numeric vector of bearings, one per edge.

Examples

g <- example_osm_graph()
head(ox_bearings(g))

osmnxr documentation built on Oct. 20, 2026, 1:07 a.m.