Index
Geomorphometry.D8
Geomorphometry.DInf
Geomorphometry.FD8
Geomorphometry.Horn
Geomorphometry.MaximumDownwardGradient
Geomorphometry.SpreadMethod
Geomorphometry.ZevenbergenThorne
Geomorphometry.BPI
Geomorphometry.RIE
Geomorphometry.SPI
Geomorphometry.TPI
Geomorphometry.TRI
Geomorphometry.TWI
Geomorphometry.aspect
Geomorphometry.cellsize
Geomorphometry.entropy
Geomorphometry.entropy!
Geomorphometry.filldepressions
Geomorphometry.flowaccumulation
Geomorphometry.hillshade
Geomorphometry.multihillshade
Geomorphometry.opening!
Geomorphometry.opening_circ!
Geomorphometry.pitremoval
Geomorphometry.plan_curvature
Geomorphometry.pmf
Geomorphometry.profile_curvature
Geomorphometry.prominence
Geomorphometry.prominence
Geomorphometry.pssm
Geomorphometry.roughness
Geomorphometry.round_odd
Geomorphometry.rugosity
Geomorphometry.skb
Geomorphometry.skbr
Geomorphometry.skbr
Geomorphometry.slope
Geomorphometry.smf
Geomorphometry.spread
Geomorphometry.spread
Geomorphometry.spread
Geomorphometry.spread
Geomorphometry.tangential_curvature
Reference - Exported functions
Geomorphometry.Horn Type
Third order finite difference estimator using all 8 neighbors by Horn, (1981).
sourceGeomorphometry.ZevenbergenThorne Type
Second order finite difference estimator using all 4 neighbors by Zevenbergen and Thorne, (1987).
sourceGeomorphometry.BPI Function
BPI(dem::AbstractMatrix{<:Real})
BPI stands for Bathymetric Position Index (Lundblad et al., 2006), which is defined as the difference between a central pixel and the mean of the cells in an annulus around it.
sourceGeomorphometry.RIE Function
RIE(dem::AbstractMatrix{<:Real})
RIE stands for Roughness Index Elevation, which quantifies the standard deviation of residual topography (Cavalli et al., 2008)
sourceGeomorphometry.SPI Method
SPI(dem::AbstractMatrix; method=D8(), cellsize=cellsize(dem))
Computes the Stream Power Index (SPI) of a digital elevation model (DEM) dem
with an optional method
for flow direction and a cellsize
.
Geomorphometry.TPI Function
TPI(dem::AbstractMatrix{<:Real})
TPI stands for Topographic Position Index, which is defined as the difference between a central pixel and the mean of its surrounding cells (see Wilson et al 2007, Marine Geodesy 30:3-35).
sourceGeomorphometry.TRI Method
TRI(dem::AbstractMatrix{<:Real})
TRI stands for Terrain Ruggedness Index, which measures the difference between a central pixel and its surrounding cells. This algorithm uses the square root of the sum of the square of the difference between a central pixel and its surrounding cells. This is recommended for terrestrial use cases.
sourceGeomorphometry.TWI Method
TWI(dem::AbstractMatrix; method=D8(), cellsize=cellsize(dem))
Computes the Topographic Wetness Index (TWI) of a digital elevation model (DEM) dem
with an optional method
for flow direction and a cellsize
.
Geomorphometry.aspect Method
aspect(dem::Matrix{<:Real}, method=Horn())
Aspect is direction of slope
.
Geomorphometry.entropy Method
entropy(dem::AbstractMatrix{<:Real}; step=0.5)
Entropy calculates the Shannon entropy of the surrounding cells of a central cell. step
is the bin size for the histogram.
Geomorphometry.filldepressions Function
filldepressions(dem::AbstractMatrix, mask::Matrix{Bool})
Performs the Priority-Flood algorithm (Barnes et al., 2014) on the given digital elevation model (DEM) dem
with an optional mask
.
Arguments
dem::AbstractMatrix
: A 2D array representing the digital elevation model (DEM).mask::AbstractMatrix{Bool}
: A 2D boolean array representing the mask. Cells withtrue
values are considered in the computation, while cells withfalse
values are ignored.
Geomorphometry.flowaccumulation Function
flowaccumulation(dem::AbstractMatrix, closed::Matrix{Bool}, method::FlowDirectionMethod)
Computes the flow accumulation of a digital elevation model (DEM) dem
with an optional closed
mask and a method
for flow direction. Returns the flow accumulation and the flow direction (local drainage direction or ldd)
Geomorphometry.hillshade Method
hillshade(dem::Matrix{<:Real}; azimuth=315.0, zenith=45.0, cellsize=cellsize(dem))
hillshade is the simulated illumination of a surface based on its slope
and aspect
given a light source with azimuth and zenith angles in °, as defined in Burrough, P. A., and McDonell, R. A., (1998).
Geomorphometry.multihillshade Method
multihillshade(dem::AbstractMatrix{<:Real}; cellsize=cellsize(dem))
multihillshade is the simulated illumination of a surface based on its slope
and aspect
. Like hillshade
, but now using multiple sources as defined in Mark, R.K. (1992), similar to GDALs -multidirectional.
Geomorphometry.pitremoval Method
pitremoval(dem::AbstractMatrix{<:Real})
Remove pits from a DEM Array if the center cell of a 3x3 patch is limit
lower or than the surrounding cells.
Geomorphometry.plan_curvature Method
plan_curvature(dem::AbstractMatrix{<:Real}; cellsize = cellsize(dem), radius=1)
Calculate projected contour curvature (plan curvature) as defined by Minár et al., (2020).
sourceGeomorphometry.pmf Method
B, flags = pmf(A; ωₘ, slope, dhₘ, dh₀, cellsize, adjust, erode)
Applies the progressive morphological filter by Zhang (2003) to A
.
Output
B::Array{T,2}
Maximum allowable valuesflags::Array{Float64,2}
A sized array with window sizes if filtered, zero if not filtered.
Afterwards, one can retrieve the resulting mask for A
by A .<= B
or flags .== 0.
.
Arguments
A::Array{T,2}
Input Arrayωₘ::Real=20.
Maximum window size [m]slope::Real=0.01
Terrain slope [m/m]dhₘ::Real=2.5
Maximum elevation threshold [m]dh₀::Real=0.2
Initial elevation threshold [m]cellsize::Real=1.
Cellsize in [m]
Geomorphometry.profile_curvature Method
profile_curvature(dem::AbstractMatrix{<:Real}; cellsize = cellsize(dem), radius=1)
Calculate normal slope line curvature (profile curvature) as defined by Minár et al., (2020).
sourceGeomorphometry.pssm Method
image = pssm(dem; exaggeration=2.3, resolution=1.0)
Perceptually Shaded Slope Map by Pingel, Clarke., (2014).
Output
image::Gray{T,2}
Grayscale image
Arguments
A::Array{Real,2}
Input Arrayexaggeration::Real=2.3
Factor to exaggerate elevationcellsize::Real=1.0
Size of cell to account for horizontal resolution if different from vertical resolution
Geomorphometry.roughness Function
roughness(dem::AbstractMatrix{<:Real})
Roughness is the largest inter-cell difference of a central pixel and its surrounding cell, as defined in Wilson et al (2007, Marine Geodesy 30:3-35).
sourceGeomorphometry.rugosity Method
rugosity(dem::AbstractMatrix{<:Real})
Compute the rugosity of a DEM, which is the ratio between the surface area divided by the planimetric area.
Jenness 2019 https://onlinelibrary.wiley.com/doi/abs/10.2193/0091-7648(2004)032[0829%3ACLSAFD]2.0.CO%3B2
sourceGeomorphometry.skb Method
mask = skb(A; mean=mean(A))
Applies skewness balancing by Bartels e.a (2006) to A
. Improved the performance by applying a binary search to find the threshold value.
Output
mask::BitMatrix
Mask of allowed values
Geomorphometry.skbr Method
mask = skbr(A; iterations=10)
Applies recursive skewness balancing by Bartels e.a (2010) to A
. Applies skb
iterations
times to the object (non-terrain) mask, as to include more (sloped) terrain.
Output
mask::BitMatrix
Mask of allowed values
Geomorphometry.slope Method
slope(dem::Matrix{<:Real}; cellsize=cellsize(dem), method=Horn(), exaggeration=1.0)
Slope is the rate of change between a cell and its neighbors.
sourceGeomorphometry.smf Method
B = smf(A; ω, slope, dhₘ, dh₀, cellsize)
Applies the simple morphological filter by Pingel et al. (2013) to A
.
Output
B::Array{Float64,2}
A filtered version of A
Arguments
A::Array{T,2}
Input Arrayω::Float64=18.
Maximum window size [m]slope::Float64=0.01
Terrain slope [m/m]cellsize::Float64=1.
Cellsize in [m]
Geomorphometry.spread Method
spread(points::Matrix{<:Real}, initial::Matrix{<:Real}, friction::Real; distance=Euclidean(), res=1.0)
spread(points::Matrix{<:Real}, initial::Real, friction::Real; distance=Euclidean(), res=1.0)
Optimized (and more accurate) function based on the same friction everywhere.
When the friction is the same everywhere, there's no need for searching the shortest cost path, as one can just take a direct line to the input points.
The calculated cost is more accurate, as there's no 'zigzag' from cell center to cell center.
sourceGeomorphometry.spread Method
spread(::Eastman, points::Matrix{<:Real}, initial::Matrix{<:Real}, friction::Matrix{<:Real}; res=1, limit=Inf, iterations=3)
Pushbroom method for friction costs as discussed by Eastman (1989). This method should scale better (linearly) than the Tomlin (1983) method, but can require more iterations
than set by default (3) in the case of maze-like, uncrossable obstacles.
Output
Array{Float64,2}
Total friction distance
Arguments
points::Matrix{<:Real}
Input Arrayinitial::Matrix{<:Real}
Factor to exaggerate elevationfriction::Matrix{<:Real}
Resolution of cell sizeres=1
Resolution or cell sizelimit=Inf
Initial fill value
Geomorphometry.spread Method
spread(points::Matrix{<:Real}, initial::Matrix{<:Real}, friction::Matrix{<:Real}; cellsize=(1,1), limit=Inf, method=Tomlin())
Total friction distance spread from points
from initial
with friction
. By default uses Tomlin, see SpreadMethod for other algorithms.
Geomorphometry.spread Method
spread(::Tomlin, points::Matrix{<:Real}, initial::Matrix{<:Real}, friction::Matrix{<:Real}; res=1, limit=Inf, method=Tomlin())
Total friction distance spread from points
as by Tomlin (1983). This is also the method implemented by PCRaster.
Output
Array{Float64,2}
Total friction distance
Arguments
points::Matrix{<:Real}
Input Arrayinitial::Matrix{<:Real}
Initial values of the resultfriction::Matrix{<:Real}
Resolution of cell sizeres=1
Resolution or cell sizelimit=Inf
Initial fill value
Geomorphometry.tangential_curvature Method
tangential_curvature(dem::AbstractMatrix{<:Real}; cellsize = cellsize(dem), radius=1)
Calculate normal contour curvature (tangential curvature) as defined by Minár et al., (2020).
sourceReference - Internal functions
Geomorphometry.cellsize Method
cellsize(dem)
Return an Tuple with the x and y length of each cell of the dem. Set them negatively to flip the image.
sourceGeomorphometry.entropy! Method
entropy!(dem::AbstractMatrix{<:Real})
Entropy calculates the Shannon entropy of the surrounding cells of a central cell.
sourceGeomorphometry.prominence Method
prominence(dem::AbstractMatrix{<:Real})
Prominence calculates the number of cells that are lower or equal than the central cell. Thus, 8 is a local maximum (peak), while 0 is a local minimum (pit).
source