Description Usage Arguments Details References Examples
Void filling using trigonometric, elevation of pixels surrounding the voids, and slope and aspect from the fill source.
1 | fill_voids_k08(x, slp, asp, show_progress_bar = TRUE)
|
x |
|
slp |
|
asp |
|
show_progress_bar |
logical. |
This function implement the algorithm developed by Karkee et al. (2008) (see references). The filling process iteratively grows from the surrounding pixels to the center of the void.
Karkee, M., Steward, B., Aziz, S., 2008. Improving quality of public domain digital elevation models through data fusion. Biosyst. Eng. 101, 293-305. doi:10.1016/j.biosystemseng.2008.09.010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | set.seed(11)
reference <- fake_dem(n_random_data = 60, z_range = c(0, 600))
plot(reference)
set.seed(18)
fillSource <- fake_dem(z_range = c(0, 20))
fillSource <- fillSource - mean(fillSource[])
fillSource <- fillSource + reference
fillSource <- smooth_dem(fillSource, theta = 6)
plot(fillSource)
p <- sampleRegular(reference, 10, sp = TRUE)
voidsMask <- fake_voids(p, void_size = 20, reference)
dem <- reference
dem[voidsMask] <- NA
plot(dem)
slp <- terrain(fillSource, "slope")
asp <- terrain(fillSource, "aspect")
demF2 <- fill_voids_k08(dem, slp, asp, show_progress_bar = TRUE)
plot(demF2)
plot(demF2 - reference)
hs <- hillShade(terrain(demF2, "slope"), terrain(demF2, "aspect"))
plot(hs , col= grey((0:255)/255), legend = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.