swath_stats {geoprofiler} | R Documentation |
Summary Statistics on Swath Elevation Profile
Description
Statistics of the elevation data across a swath profile.
Usage
swath_stats(x, profile.length = NULL)
Arguments
x |
list. The return object of |
profile.length |
numeric or |
Value
tibble
See Also
Examples
# Create a random raster
r <- terra::rast(ncol = 10, nrow = 10, xmin = -150, xmax = -80, ymin = 20, ymax = 60)
terra::values(r) <- runif(terra::ncell(r))
# Create a random profile
profile <- data.frame(lon = c(-140, -90), lat = c(55, 25)) |>
sf::st_as_sf(coords = c("lon", "lat"), crs = "WGS84")
swath <- swath_profile(profile, r, k = 5, dist = 10)
swath_stats(swath, profile.length = profile_length(profile_line(profile)))
[Package geoprofiler version 0.0.2 Index]