profile_coords {geoprofiler} | R Documentation |
Profile Coordinates
Description
Project points on a cross section given by a starting point and the direction
Usage
profile_coords(x, profile, azimuth = NULL, drop.units = TRUE)
Arguments
x |
|
profile |
|
azimuth |
numeric. Direction (in degrees) emanating from starting point.
Is ignored when |
drop.units |
logical. Whether the return should show the units or not. |
Value
tibble
where X
is the distance along the profile line.
Y
is the distance across the profile line. (units of X
and Y
depend on
coordinate reference system).
Author(s)
Tobias Stephan
Examples
data(locations_example)
p1 <- data.frame(lon = -90.8, lat = 48.6) |>
sf::st_as_sf(coords = c("lon", "lat"), crs = "WGS84")
profile_crds <- profile_coords(locations_example, profile = p1, azimuth = 135)
head(profile_crds)
# Plot the transformed coordinates
plot(profile_crds)
[Package geoprofiler version 0.0.2 Index]