Learn R Programming

lawn (version 0.1.7)

lawn_bearing: Get geographic bearing between two points

Description

Takes two data-Point's and finds the geographic bearing between them

Usage

lawn_bearing(start, end, lint = FALSE)

Arguments

start
starting data-Point
end
ending data-Point
lint
(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Value

bearing (numeric) in decimal degrees

See Also

Other measurements: lawn_along, lawn_area, lawn_bbox_polygon, lawn_center, lawn_centroid, lawn_destination, lawn_distance, lawn_envelope, lawn_extent, lawn_line_distance, lawn_midpoint, lawn_point_on_surface, lawn_size, lawn_square

Examples

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

end <- '{
  "type": "Feature",
  "properties": {
    "marker-color": "#0f0"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [-75.534, 39.123]
  }
}'
lawn_bearing(start, end)

Run the code above in your browser using DataLab