Regions of like SD(elevation)

Compute SD of elevation on 50x50 meter grid

# prepage SD map
r.neighbors in=e10 out=e10_sd method=stddev size=5 --o

Cluster on (standardized) coordinates and SD of elevation

x <- readRAST6('e10_sd')
n_classes <- 5
x.clara <- clara(data.frame(coordinates(x),  slot(x, 'data')), k=n_classes, stand=TRUE)
x$clust <- factor(x.clara$clustering)
spplot(x, zcol='clust', col.regions=terrain.colors(n_classes))
# pdf(file='elev_sd_clust.pdf', height=5, width=5)
boxplot(x$e10_sd ~ factor(x$clust, levels=order(tapply(x$e10_sd, x$clust, median)) ), ylab='Standard Deviation (meters)', xlab='Class', main='Standard Deviation of Elevation on 50x50 Grid', cex=0.5 )
x$clust <- x.clara$clustering
writeRAST6(x, zcol='clust', vname='t_clust')

Finish up in GRASS

# convert to int map
r.mapcalc "t_clust = int(t_clust)"
# vectorize
# t_clust out=t_clust feature=area --o
# simple map
d.rast.leg t_clust
d.vect contours
d.vect upflow col=white
d.vect flow col=white
# save
d.out.file out=sd_clust_and_flow

Regions of like SD(elevation)


Elevation standard deviation classes