Description Usage Arguments Value Note Examples
Get Transects
1 |
linestring |
A data.frame of sf_LINESTRING |
raster |
A raster (digital elevation model (DEM)) |
distance |
A |
length |
A |
A sf_POINT data.frame with elevations along transects (elevation_adj
) and trend line (elevation_main
).
Be aware of your crs projection as this will affect the length and distance arguments.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
pts = matrix(c(170800,172000, 5410500, 5410400), 2)
line = sf::st_as_sf(sf::st_sfc(sf::st_linestring(pts), crs = 32612))
ele <- elevatr::get_elev_raster(line,
z = 13,
prj = '+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs')
rem <- get_rem(line, ele, distance = 100, length = 500)
ele_crop <- terra::crop(terra::rast(ele), terra::vect(sf::st_buffer(line, 200)))
terra::plot(ele_crop)
plot(rem$geometry)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.