R/angular-math.R
st_avg_line_azimuth.RdComputes the azimuth and length for every sub-segment (i.e. the line between two successive vertices) and then takes a length-weighted average of all sub-segments.
Typically used within a purrr map function.
st_avg_line_azimuth(linestring, coord_local)Input linestring (from sf)
Local coordinate system EPSG code of input linestring
Average azimuth in decimal degrees