geo_bearing: Calculate bearing

View source: R/bearing.R

geo_bearingR Documentation

Calculate bearing

Description

Calculate bearing

Usage

geo_bearing(point1, point2)

Arguments

point1

start geojson Feature<Point>

point2

end geojson Feature<Point>

Value

(number) bearing in decimal degrees

Examples

point1 <- '{
  "type": "Feature",
  "properties": {
    "marker-color": "#f00"
   },
   "geometry": {
      "type": "Point",
      "coordinates": [-75.343, 39.984]
   }
}'

point2 <- '{
  "type": "Feature",
  "properties": {
     "marker-color": "#0f0"
   },
   "geometry": {
      "type": "Point",
      "coordinates": [-75.534, 39.123]
    }
}'

geo_bearing(point1, point2)

ropenscilabs/geoops documentation built on Nov. 8, 2024, 4:01 a.m.