Landscapes
Follow this link to a shiny app where you can experiment with the landscape parameters: Shiny app
Initial generation
Landscapes start as an empty m x n dimensional matrix. This empty landscape is then “seeded” with a specified number of land use types, where cells are randomly placed and populated with an integer value (proportional to a parameter). There are a couple of parameters at the initial cell placement stage. One controls the minimum distance between initial cells, which helps fill out the entire matrix. The other controls the number of initial cells, where more cells result in higher patchiness. Once cells are placed, these patches “grow,” where they expand until they encounter another land use type. These final boundaries are assigned to a particular land use type in a probabilistic fashion determined by the 8 cell neighborhood it is surrounded by.
Parameters: # rows, # columns, number of land use types, land use type proportions, number of initial “seeds,” and the minimum distance between patches
Smothing process
Each simulated land use type is assigned a distribution of population growth rates, and a value is generated for each pixel. These represent the baseline quality of each land use type due to habitat. An additional stressor is then imposed on non-natural land use types, representing local scale stressors like pollution. These local stressors are assigned unanimously across a patch (and the process is repeated across all non-natural patches). Finally, we generate edge effects using a moving window approach, where the edge value equals the mean of eight surrounding pixels. This has the effect of enhancing core pixels and making edges more marginal.
Parameters: habitat quality values, local stress values, edge effect strength
Simulated restoration
Two additional functions were developed to modify the output of the primary landscape function. The first simulates restoration on the edges between semi-natural habitat and natural habitat. Since the simulation processes clearly developed edges, all edges can easily be identified using the boundaries function in Terra. It then subsets to only edges between two target land use types and converts an input number of pixels into natural habitat. The other function simulates building cores in the middle of semi-natural habitat. This is done by determining the distance of all cells from the center of the patch it falls in (and cells ordering cells based on this). It then converts cells (in order) to the other land use category based upon an input value.
Parameters: land type to convert from, land type to convert to, number of cells to change

