get_map_border: Helper function to calculate the coordinate limits of map...

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Since the world map is huge, and flights are usually drawn in a relatively
small area, the map needs to be cropped based on the coordinates of airports
used. This function generates the coordinate limits of the cropped map.

Usage

1
get_map_border(v, type = c("long", "lat"), padding_ratio = 0.1)

Arguments

v

A double numeric vector - vector of longtitudes/latitudes.

type

A string - "long" or "lat". It indicates whether longtitudes or latitudes are input.

padding_ratio

A double number - 0 to 1. The padding ratio is defined as
padding / (maximum - minimum)

Value

A two-column dataframe

Examples

1
2
get_map_border(c(-20,30,60,85), type = "lat")
get_map_border(c(-10,0,10,40), type = "long", padding_ratio = 0.2)

flightplot documentation built on July 2, 2020, 3:12 a.m.