Description Usage Arguments Examples
Convert lon/lat coordinates to cartesian coordinates by first calculating great circle distance and bearing and then mapping these coordinates into cartesian space. This mapping is relative to the point centre_lat, centre_lon, which should be roughly at the midpoint of the observed data.
1 | lonlat_to_cartesian(centre_lon, centre_lat, data_lon, data_lat)
|
centre_lon |
The centre longitude |
centre_lat |
The centre latitude |
data_lon |
The data longitude |
data_lat |
The data latitude |
1 2 3 4 5 6 7 8 9 10 | # Centre at QMUL
centre_lon <- -0.040827
centre_lat <- 51.523775
# Data point at Queen Elizabeth Park
data_lon <- -0.016546
data_lat <- 51.542473
lonlat_to_cartesian(centre_lon = centre_lon,
centre_lat = centre_lat,
data_lon = data_lon,
data_lat = data_lat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.