Crops the DEM to the extent of the track with a buffer

dem2track.extent(DEM, track, buffer = 100)

Arguments

DEM

a raster containing a digital elevation model, covering the extent as the track

track

data.frame with x,y,z coordinates of the original track

buffer

buffer with, by default set to 100

Value

A the cropped digital elevation model as a raster layer.

Examples

dem2track.extent(dem, niclas)
#> class      : RasterLayer 
#> dimensions : 118, 422, 49796  (nrow, ncol, ncell)
#> resolution : 251.2, 370.8  (x, y)
#> extent     : 2556314, 2662321, 1188232, 1231986  (xmin, xmax, ymin, ymax)
#> crs        : +init=epsg:2056 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs 
#> source     : memory
#> names      : srtm_38_03 
#> values     : 412.7945, 1987.423  (min, max)
#>