relative.position: Relative Topographic Position

Description Usage Arguments Value See Also Examples

Description

relative.position and relative.rank are used with focal.function to determine the relative value of a grid cell compared to its surroundings, either on a metric scale or based on ranks.

Usage

1
2
3
relative.position(x)

relative.rank(x, ties.method = "average")

Arguments

x

a square matrix with the grid data from the moving window, possibly containing NA values

ties.method

see rank

Value

If x is provided, a numeric value in the interval [0,1] is returned.

If x is missing, a character vector of same length giving suggested variable (or file) names, here "relpos" and "relrank", respectively. See focal.function for details.

See Also

focal.function, rank, centervalue

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
m = matrix( round(runif(9,1,10)), ncol=3 )
print(m)
relative.position(m)
relative.rank(m)
## Not run: 
focal.function("dem",fun=relative.rank,radius=5)
focal.function("dem",fun=relative.position,radius=5)
relrank = as.vector(read.ascii.grid("relrank")$data)
relpos  = as.vector(read.ascii.grid("relpos")$data)
plot(relpos,relrank,pch=".")
cor(relpos,relrank,use="complete.obs",method="pearson")

## End(Not run)

debangs/RSAGA documentation built on May 15, 2019, 1:53 a.m.