This tool calculates the density of edges, or breaks-in-slope within an input digital elevation model (DEM). A break-in-slope occurs between two neighbouring grid cells if the angular difference between their normal vectors is greater than a user-specified threshold value (`norm_diff`). edge_density calculates the proportion of edge cells within the neighbouring window, of square filter dimension `filter`, surrounding each grid cell. Therefore, `EdgeDensity`is a measure of how complex the topographic surface is within a local neighbourhood. It is therefore a measure of topographic texture. It will take a value near 0.0 for smooth sites and 1.0 in areas of high surface roughness or complex topography.

The distribution of edge_density is highly dependent upon the value of the `norm_diff` used in the calculation. This threshold may require experimentation to find an appropriate value and is likely dependent upon the topography and source data. Nonetheless, experience has shown that edge_density provides one of the best measures of surface texture of any of the available roughness tools.

## See Also

circular_variance_of_aspect, multiscale_roughness, surface_area_ratio, ruggedness_index

## Function Signature

`def edge_density(self, dem: Raster, filter_size: int = 11, normal_diff_threshold: float = 5.0, z_factor: float = 1.0) -> Raster: ...`

## Project Links

WbW Homepage User Manual Support WbW