View source: R/util-point_offset.r
point_offset | R Documentation |
Calculates latitude and longitude for new point that is x meters away at bearing y from a geographic location (Longitude, Latitude) using great circle distances.
point_offset(
lon = NA,
lat = NA,
offsetDist = NA,
offsetDir = NA,
distUnit = "m"
)
lon |
vector of longitudes (dd) to calculate offset points |
lat |
vector of latitudes (dd) to calculate offset points |
offsetDist |
vector of distances to calculate offset point (meters or feet) |
offsetDir |
vector of directions to calculate point from starting point. Options are NA,"N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW" |
distUnit |
specify meters or ft ("m" or "ft") |
lat <- rep(44.0, 17)
lon <- rep(-83.0, 17)
offsetDir <- c(
NA, "N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S",
"SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"
)
offsetDist <- seq(100, 1700, by = 100)
distUnit <- "m"
point_offset(lon, lat, offsetDist, offsetDir, distUnit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.