lic_extended.extended_lic_weighted_altitude_lengthModulated#
- extended_lic_weighted_altitude_lengthModulated(grid: ndarray, cellsize: float, f: ndarray, num_steps: int, sigma_modulated: bool = True) ndarray [source]#
Applies a Line Integral Convolution (LIC) with a dynamically modulated integration length (based on f) and a variable Gaussian kernel that reduces the influence of higher terrain along the line of integration.
- Parameters:
grid (np.ndarray) – A 2D array representing the Digital Elevation Model (DEM).
cellsize (float) – The size of each raster cell in meters.
f (np.ndarray) – A 2D array (same shape as grid) in [0, 1], controlling the fraction of the maximum integration steps allowed for each pixel (e.g., in flat or steep areas).
num_steps (int) – The maximum number of integration steps for each pixel.
sigma_modulated (bool, optional) – If True, the sigma for the weighting in the LIC algorithm is modulated by the altitude. If False, a fixed Gaussian sigma is used.
- Returns:
The DEM after the weighted LIC processing, where ridges are accentuated by decreasing the Gaussian kernel’s sigma for portions that lie above the starting pixel’s altitude.
- Return type:
np.ndarray