dem_sample | R Documentation |
Sample a random DEM with specified size from a larger DEM
dem_sample(data, L, allow_NA = TRUE, plot = FALSE, max_iter = 100)
data |
Digital elevation model of class RasterLayer. |
L |
Size of square to cut out of DEM. |
allow_NA |
Logical. Allow NAs in the sample? Useful when DEM is not regular. |
plot |
Logical. Plot the DEM and the cropped section? |
max_iter |
Maximum number of random crops to try when allow_NA = FALSE before failing. |
Digital elevation model of class RasterLayer.
Not allowing NAs may increase sampling time for irregular DEMs that contain a lot of NAs; e.g., structure from motion transects.
dem <- dem_sample(horseshoe, L = 2, plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.