Accelerating advances in landscape connectivity modelling with the ConScape library
Handling Editor: Laura Graham
Abstract
- Increasingly precise spatial data (e.g. high-resolution imagery from remote sensing) allow for improved representations of the landscape network for assessing the combined effects of habitat loss and connectivity declines on biodiversity. However, evaluating large landscape networks presents a major computational challenge both in terms of working memory and computation time. We present the ConScape (i.e. “connected landscapes”) software library implemented in the high-performance open-source Julia language to compute metrics for connected habitat and movement flow on high-resolution landscapes.
- The combination of Julia's ‘just-in-time’ compiler, efficient algorithms and ‘landmarks’ to reduce the computational load allows ConScape to compute landscape ecological metrics—originally developed in metapopulation ecology (such as ‘metapopulation capacity’ and ‘probability of connectivity’)—for large landscapes. An additional major innovation in ConScape is the adoption of the randomized shortest paths framework to represent connectivity along the continuum from optimal to random movements, instead of only those extremes.
- We demonstrate ConScape's potential for using large datasets in sustainable land planning by modelling landscape connectivity based on remote-sensing data paired with GPS tracking of wild reindeer in Norway. To guide users, we discuss other applications, and provide a series of worked examples to showcase all ConScape's functionalities in Supplementary Material.
- Built by a team of ecologists, network scientists and software developers, ConScape is able to efficiently compute landscape metrics for high-resolution landscape representations to leverage the availability of large data for sustainable land use and biodiversity conservation. As a Julia implementation, ConScape combines computational efficiency with a transparent code base, which facilitates continued innovation through contributions from the rapidly growing community of landscape and connectivity modellers using Julia.
1 INTRODUCTION
Anthropogenic land use is one of the main drivers for the current loss of biodiversity (Pimm et al., 2014; Díaz et al., 2019), due to both habitat loss and fragmentation (Chase et al., 2020; Haddad et al., 2015). Biodiversity and species persistence rely not only on the availability of suitable habitat, but also on it being well-connected (Chase et al., 2020; Hanski and Ovaskainen, 2000), as connectivity supports multiple ecological processes across a range of scales from local foraging, seasonal migrations, gene flow among populations, metapopulation persistence, up to range shifts for climate adaptation (McGuire et al., 2016). However, tackling the challenge of prioritizing where to protect or restore habitat to improve connectivity requires both high-resolution landscape representations (Zeller et al., 2017) and modelling tools with the computational power to use them. The availability of such high-resolution landscape representations is increasing rapidly, for instance through remote sensing (Pettorelli et al., 2016), which has brought the opportunities (Ciudad et al., 2021), but also the challenges of ‘large data’ to connectivity modelling (Farley et al., 2018).
The modelling of suitable and connected habitat in landscapes requires the assessment of ecological connectivity between all pairs of habitat ‘units’ (Saura and Pascual-Hortal, 2007), termed the ‘landscape matrix’ (; Hanski, 1999). The landscape matrix, , consists of elements , where is the size, quality or suitability of habitat units or and is the ecological connectivity or proximity between habitat units as source and as target (Hanski, 1999; Hanski and Ovaskainen, 2000). Two choices have to be made in representing a landscape through : first habitat units can be used to refer either to discrete patches of varying size or to pixels or cells on a grid with varying suitability (see for discussion Lausch et al., 2015), and second connectivity between units can be quantified using Euclidean or ecological distance and proximity metrics (reviewed in: van Moorter et al., 2021). In the seminal works from metapopulation ecology, a landscape was typically represented by a few to typically <500 patches of habitat, surrounded by homogeneous unsuitable areas (e.g. Hanski, 1999). However, the availability of high-resolution representations of landscapes has promoted modelling approaches that incorporate the heterogeneity of spatial units between and within habitat patches (Lausch et al., 2015; Hilty et al., 2012). While we expect that advances in spatial data will allow modellers to capture more detail, or consider finer-scale processes (e.g. use higher resolution data for the same extent), or tackle landscapes with larger extents, these advances increase the computational challenges. Specifically, the computation of becomes a major challenge, as its size increases with the square of the number of habitat units (e.g. pixels from a grid-based landscape).
As with representations of a landscape's habitat units, there have been major advances in the representation of landscape heterogeneity for movement processes during the past two decades. In the earlier work, connectivity for the landscape matrix was represented using simple functions of the Euclidean distance between habitat patches (e.g. Hanski, 1999; Hanski and Ovaskainen, 2000). However, the Euclidean distance ignores the role of intervening landscape as connector, stepping stone, corridor or barrier to movement (Saura and Pascual-Hortal, 2007; Saura et al., 2014; Panzacchi et al., 2016), and is therefore often a poor approximation of the ecological distance between areas (Sutherland et al., 2015). Not surprisingly, ecological distance metrics that incorporate heterogeneity in how various landscape elements facilitate or hinder movement, such as least-cost distances, are increasingly being adopted (Fletcher et al., 2016). Least-cost distances assume that movement follows the path of lowest cost, and are a great improvement over Euclidean distances to quantify ecological connectivity (Sutherland et al., 2015). However, the underlying assumption of optimal movement is rarely realistic, and focusing on a single ‘best’ path can be overly restrictive in terms of identifying areas for connectivity conservation (McRae et al., 2008; Panzacchi et al., 2016). McRae and co-workers adopted electrical circuit theory for connectivity modelling using random walks to overcome the limitations of the optimal and single path assumptions (McRae and Beier, 2007; McRae et al., 2008), but this approach in turn omits the role of information in ecological connectivity (van Moorter et al., 2021). More recently, these two extremes on a continuum from random to optimal movement have been integrated in landscape connectivity modelling using the ‘randomized shortest paths’ framework (RSP; Van Etten and Hijmans, 2010; Panzacchi et al., 2016), which overcomes the limitations attached to these extreme ends (see for a review, van Moorter et al., 2021).
Two broad classes of metrics have been developed to quantify the amount of suitable and connected habitat—and hence the importance—of a landscape unit, either through summation or through eigenanalysis of the landscape matrix . Hanski first introduced the ‘neighbourhood habitat area index’ of sources by summing over all columns or targets (pp. 83 in Hanski, 1999). This formalism was extended simultaneously by Saura and Pascual-Hortal (2007) and Drielsma et al. (2007b) using the least-cost distance as an ecological distance, instead of the Euclidean distance, to account for the role of intervening habitat. In addition to summation, Hanski and Ovaskainen (2000) and Ovaskainen and Hanski (2003) developed an approach based on eigenanalysis of to characterize the importance of habitat units. Interestingly, both approaches to summarize for a habitat unit are related in graph theory to the two different types of radial centrality measures, that is, a node's connectedness with the rest of the network (Borgatti and Everett, 2006), respectively, the closeness-centrality and eigen-centrality. Although these approaches are both summaries of M, they have developed largely independently in the literature (but see Saura and Rubio, 2010, for discussion).
To meet the challenge of computing landscape metrics, derived from metapopulation ecology, using recent advances in connectivity modelling for high-resolution landscapes a team of ecologists, network scientists and software developers collaborated to develop the ConScape software library. The ConScape library uses efficient algorithms to compute or estimate landscape metrics derived from (e.g. Hanski and Ovaskainen, 2000; Ovaskainen and Hanski, 2003; Saura and Pascual-Hortal, 2007) using advanced ecological connectivity metrics from the RSP framework (Saerens et al., 2009; Kivimäki et al., 2014). ConScape is implemented in Julia, which combines the readability of scripting languages such as R or Python, with the performance of a statically compiled language such as C or Fortran (Bezanson et al., 2017). Although R is a popular software platform among ecologists, its computational limitations require performance-critical libraries, including those for connectivity modelling, to use compiled C libraries (e.g. van Etten, 2017; Marx et al., 2020), which makes the library code essentially a ‘black box’ for most ecologists, and hampers community-driven innovations that arise when code is accessible. Hence, similar to the new Circuitscape implementations (Anantharaman et al., 2020; Hall et al., 2021; Landau et al., 2021), we opted for the Julia language to implement the ConScape library, where the ‘just-in-time’ compiler enables us to write generic code and keep the code base simple. Interestingly, the development of Julia was inspired in part by collaborations between computer scientists and landscape ecologists addressing the challenge of modelling connectivity on increasingly large grids (Anantharaman et al., 2020; Hall et al., 2021).
The goal of this paper is to introduce ecologists to this exciting software library for connectivity modelling, and to highlight how partnering with network scientists and software developers influenced our process, products and long-term approach for continued improvement and innovation. We first present ConScape's main features and describe the metapopulation-based methods that are implemented in ConScape to quantify the amount of connected habitat (based on either summation or eigenanalysis of ) using the RSP framework to compute the ecological connectivity among habitat units. Second, we illustrate the main workflow to quantify landscape connectivity both in terms of the amount of connected habitat in the landscape, but also movement flows, using data for reindeer space use and movement in Norway. This section also describes additional ConScape features related to workflow management (e.g. input and output of maps). Finally, we highlight a major innovation, the use of landmarks to reduce computational load, which addresses a common challenge in connectivity modelling when applied to high-resolution landscape datasets. These features are further demonstrated in the tutorials and examples provided in the supplementary material (Appendix A) to introduce new users to the ConScape-library in Julia.
2 MATERIALS AND METHODS
We chose to implement the ConScape library in Julia for its combination of clear syntax and fast processing speed, but also for its fast growing community of developers of computation intensive tools for ecological applications in general (ecojulia.org) and connectivity modelling in particular (e.g. Anantharaman et al., 2020; Hall et al., 2021; Landau et al., 2021). For instance, the widely used connectivity modelling tool Circuitscape (Dickson et al., 2019) was recently ported to Julia to increase computational performance (Anantharaman et al., 2020; Hall et al., 2021). We expect that aligning our work with this growing community of connectivity modellers using high-performance software will help increase the rate of innovation, and sustain the development of accessible, open-source tools over the long term. In this section, we describe the core features and functionalities implemented in the ConScape library following the same five-step structure as the demonstration in the ‘Results’ section.
2.1 Step 1: ConScape's Grid
The ConScape library is organized in two layers to allow easy application of the RSP algorithms to landscape grids, but also to general graphs. For the first layer, the actual RSP algorithms are implemented as functions of the (sparse) matrix inputs defined in the original papers without reference to landscape ecology (Kivimäki et al., 2014, 2016). For the second layer on top of these general RSP algorithms, ConScape assumes that the analysed graph refers to a landscape grid. These two layers also allow ConScape to deal conveniently with both the patch-based and raster-based (i.e. a grid) landscape representations. In this paper, we focus on the representation of a landscape as a grid of pixels, as habitat quality and permeability are increasingly represented continuously using habitat modelling on remote-sensing input data (Guisan and Thuiller, 2005; Guisan et al., 2017; Zeller et al., 2012). The information associated with a landscape and quantities related to the RSP analysis of that landscape are stored in the Julia objects or ‘structs’ Grid and GridRSP (see below), respectively. This organization of the library allows for a convenient workflow where the user only needs to manage a relative small number of objects, while still allowing for direct access to the underlying implementations of the RSP algorithms, if needed.
A note on notation, we use superscript to define quantities (as, for instance, and below, see Table 1 for the symbols used in this paper), whereas we used italic subscript for an index (e.g. is element of vector and is row and column of matrix ). In ConScape, the landscape is represented as a directed graph of connected nodes (i.e. patches or pixels), where each node has a value as source of habitat () and as target habitat (), and the connection between two adjacent nodes is characterized by both a likelihood () and a cost () of movement. The Grid function (see Table 2) requires these four inputs to construct the Grid object. In the absence of separate source and target qualities, ConScape assumes: . Similarly, can be provided as a function of , for example, , assuming well-adapted movement (van Moorter et al., 2021). Furthermore, assuming that habitat quality equals permeability, one could use the same habitat suitability map as input to qualities and likelihood of movement (Zeller et al., 2012). These options allow the use of ConScape for more data limited applications (see van Moorter et al., 2021, for further discussion on the underlying assumptions).
Symbol | Meaninga |
---|---|
Step probability matrix of movement between adjacent cells and | |
Cost of movement matrix between adjacent cells and | |
Random walk transition probability matrix | |
Randomness parameter for the RSP distribution over paths | |
The survival probability matrix from a source to a target cell | |
The RSP expected cost matrix of moving from a source to a target cell | |
Proximity matrix, or | |
Distance scaling parameter | |
Vector of cell qualities as a source | |
Vector of cell qualities as a target | |
Diagonal matrix with on the diagonal | |
Diagonal matrix with on the diagonal | |
Landscape matrix, |
- a See main text for further details.
Functiona | Short description of outputb |
---|---|
Grid | The landscape as a grid of pixels connected to their neighbours |
GridRSP | The Grid augmented with the path distribution between and , for a given randomness, |
expected_cost | The RSP expected cost between all node pairs |
survival_probability | The survival probability between all node pairs |
least_cost_distance | The least-cost distance between all node pairs |
connected_habitat | The cumulative amount of connected habitat for all nodes |
eigenmax | The eigenanalysis-based amount of connected habitat for all nodes |
betweenness_qweighted | The RSP betweenness of all nodes weighted with their qualities |
betweenness_kweighted | The RSP betweenness of all nodes weighted with their qualities and proximity |
- a Only the main functions are listed here, see the library documentation for a full overview.
- b See main text for further details.
2.2 Step 2: ConScape's GridRSP
The ConScape library implements the RSP framework, which defines a distribution over all paths between source and target node . The RSP framework uses an ‘optimality’ (or inverse randomness) parameter to control the focus of this distribution on the cost of the paths (Saerens et al., 2009; van Moorter et al., 2021). When , the cost of the paths is not important and the path distribution will converge to the random walk distribution. As increases, the distribution will increasingly focus on paths of lower cost. Asymptotically, as , the RSP distribution will focus exclusively on the (typically single) least-cost path. Moreover, the RSP framework is based on the standard ‘absorbing Markov chain’ (van Moorter et al., 2021; Norris, 1997, for Markov chains theory), which was recently proposed as a framework to model connectivity in the presence of movement mortality (Fletcher Jr et al., 2019). See van Moorter et al. (2021) for further discussion of the RSP framework to quantify connectivity.
2.3 Step 3: Amount of connected habitat
From the landscape matrix , ConScape computes two types of summary statistics for the amount of connected habitat () to a pixel or in the landscape based either on summation or on eigenanalysis.
2.4 Step 4: Movement flow
Although (meta-)population persistence depends upon the amount of connected habitat (Hanski and Ovaskainen, 2000), the identification of movement corridors is also crucial for connectivity conservation (Beier and Noss, 1998; Beier et al., 2008). Hence, ConScape provides several functions to represent the amount of movement flow through each node based on the simple RSP betweenness (see for more details: Appendix B and Kivimäki et al., 2016). However, note that the simple RSP betweenness is not equivalent to the current flow betweenness (for ), because ingoing and outgoing flows through an edge do not neutralize each other in simple RSP betweenness as they do in current flow betweenness (Kivimäki et al., 2016). Two variants of the simple RSP betweenness metrics are implemented to better capture the actual movement flow of individuals on the landscape (Bodin and Saura, 2010). The quality-weighted betweenness weights the paths between and with their qualities and . The proximity-weighted betweenness weights the paths not only by the quality and , but also by their proximity . This proximity-weighted RSP betweenness is similar to the ‘generalized betweenness centrality’ proposed by Bodin and Saura (2010), but further extends it using the RSP framework instead of the least cost. Thus, as , the proximity-weighted betweenness using the RSP expected cost is closely related to the ‘generalized betweenness’ (see Kivimäki et al., 2016, for a discussion of the limit); however, ConScape allows the use of different distance and proximity metrics to weight the paths between and . Bodin and Saura (2010) consider this metric ‘particularly suitable for assessing the betweenness of a patch when the actual flows of organisms, and not just the possibilities for dispersals, are being considered’. We therefore consider this proximity-weighted betweenness as particularly useful to identify movement corridors and pinch points for connectivity conservation.
2.5 Step 5: Enhancing performance
For a landscape with cells, the computation of the landscape matrix requires pairwise proximities (), which is demanding both in terms of computation and memory for high-resolution large-extent landscapes. Therefore, we developed landmark-based algorithms (Appendix C: Algorithm 1), where we compute the distances/proximities from nodes to landmarks (see for the n-to-m method: pp. 111 in Kivimäki, 2018), which depending on the number of landmarks () can lead to a substantial reduction in the computational load with limited loss in accuracy. ConScape has a utility function for the coarse_graining of the landscape, which sets the centre pixel's target quality to the sum of all qualities within that neighbourhood (based on queen's contiguity). In other words, the target pixels are aggregated to make a lower resolution grid. Although the target qualities are treated at a lower resolution, the source qualities and paths are still considered at their original resolution.
3 RESULTS: WORKFLOW DEMONSTRATION
In this section, we illustrate the ConScape workflow that we use to quantify landscape connectivity both in terms of the amount of connected habitat in the landscape, but also movement flows. Our example focuses on a population of wild reindeer in Norway during summer. Although wild reindeer in Norway are not experiencing the same level of population decline as other populations (Vors and Boyce, 2009), their habitat is becoming smaller and increasingly fragmented due to anthropogenic land uses and infrastructures (Nellemann et al., 2003). Hence, the quantification of the amount of connected habitat and how it is affected by human activities is crucial for effective land management to ensure the long-term availability of habitat to sustain reindeer populations in Norway. In previous work, we used GPS-tracking data in a habitat selection analysis to estimate habitat quality (Panzacchi et al., 2015) and in a step selection analysis to estimate habitat permeability (Panzacchi et al., 2016), we refer readers to these earlier studies for further details on data and methods. We use the predicted habitat suitability and permeability from these two analysis in a workflow illustration that focuses on the main steps and ConScape functions. For convenience, we resampled these maps to approximately 5,000 pixels of 1 × 1 km for the illustrations (see Appendix E for computational performance on landscapes up to 20 million pixels). The full code for this demonstration is available in Notebook A.1 in the Appendix. We begin with an overview of ConScape's general workflow (Figure 1) and a list of the main functions in ConScape (Table 2). Note, as discussed in van Moorter et al. (2021), different types of data can be used to parameterize a landscape network for a species; even in the absence of empirical data, expert-based landscape networks could be used for the ConScape workflow (e.g. Stange et al., 2019).
3.1 Step 1: Data import and Grid creation
In addition to the core functions in ConScape, the library also has a set of utility functions to aid with various components of the analytical workflow. As discussed above, ConScape has a two-layered implementation, which allows the use of general graphs in addition to the grid-based landscape representations for ecology. For the import of landscape maps, the readasc utility function reads ASC raster files into ConScape, while the complementary writeasc function writes matrices back to raster files for further inspection or processing in other software and geographic information systems. Other raster formats can easily be read through other Julia libraries, such as Raster.jl, see Notebook A.1 in Supplementary Material.
After reading the map data, we create the landscape Grid, which is the object defined in ConScape to describe the raster-based representation of a landscape as a graph (see Figure 1). Each pixel or node in the landscape graph is associated with four properties: (a) a source quality, , (b) a target quality, , (c) the likelihood of moving from to adjacent node , and (d) the cost of moving from to , . Thus, the qualities are properties of individual nodes, whereas the movement likelihood and cost characterize the permeability of the landscape and are properties of a pair of adjacent nodes . The utility function graph_matrix_from_raster converts a raster map into an adjacency matrix (see Appendix A.1 for more details). Although ConScape allows for these four properties to be independent (see for instance, Notebook A.4 in Appendix), it is possible to simplify the inputs through additional assumptions. For instance, for the demonstration, we assumed that the quality of a pixel is identical as a source and as a target, and we assumed well-adapted movement to define the cost matrix as a function of the non-zero values (‘mapnz’) of the step likelihood, (i.e. animals are less likely to move through areas with a higher cost of movement, see for further discussion: van Moorter et al., 2021).
3.2 Step 2: GridRSP creation
The most computationally demanding component of the workflow is creation of the ‘fundamental matrix’, , which forms the basis for virtually all further computations. We therefore store this matrix as a dedicated field of the GridRSP-type. A GridRSP-object is created from a Grid object with to control the randomness of the RSP distribution over paths. In other words, the representation of the landscape as a graph with connections among adjacent pixels and in the Grid is augmented by the path distribution between non-adjacent source and target pixels in the GridRSP, for a given level of randomness in the movement.
The fundamental matrix (, Equation 1 in Appendix B) is computed by matrix inversion and contains only positive values if the graph is strongly connected. However, if either is large (i.e. when approximating the least-cost distribution), edge costs on some edges are large, or the random walk transition probabilities, are extremely small, then some elements of may result in zeros due to numerical underflow (i.e. rounding off). In such a case, ConScape presents a warning to the user during the construction of the GridRSP object, allowing the user to change the input (e.g. reduce or remove poorly connected nodes from the graph). If these solutions are not desirable, ConScape provides two algorithms based on the ‘directed acyclic graph’ (DAG) trick to approximate (Algorithm 6 in Appendix D) or compute (Algorithm 7 in Appendix D) RSP-based distances. The DAG trick allows ConScape to compute RSP-based distances and proximities that closely approximate optimal movements without computing the fundamental matrix (Appendix D), but it is considerably slower than the default algorithm (the default algorithm took about seconds for the test landscape, while using the DAG trick the iterative close approximation required min and the ‘single-pass’ approximation about 113.35 s, see Appendix A.1 the section on ‘numerical issues’).
From the fundamental matrix, different connectivity metrics can easily be computed: (a) the RSP expected costs (Equation 12 in Appendix B, with expected_cost) of moving between and given that the random walker arrived, and (b) the probability of survival (Equation 11 in Appendix B, with survival_probability). See Notebook A.3 in Appendix for more details on different ecological distances and proximities in ConScape. In general, the ecological proximity represents an intermediate step in the ConScape workflow towards the computation of the landscape matrix (Equation 4).
3.3 Step 3: Amount of connected habitat
The main focus of ConScape is the computation of the amount of functionally connected habitat. ConScape generalizes previous landscape connectivity metrics—that is, probability of connectivity (Saura and Pascual-Hortal, 2007), cost–benefit approach (Drielsma et al., 2007a) and neighbourhood habitat area index (pp. 83 in Hanski, 1999)—using the RSP framework to quantify the amount of connected habitat. The connected_habitat function in ConScape computes the amount of connected target habitat for each pixel as a source (Equation 5), see Notebook A.5 in Appendix for more details. The result is shown in Figure 2 for the RSP expected cost distance, a different ‘connectivity_function’ can be used, such as the ‘survival_probability’ (see Notebook A.5). In addition to the different connectivity functions in ConScape, the amount of connected habitat can also be quantified using eigenanalysis with the eigenmax function (Equations 8 and 9; see Notebook A.5 for demonstration). The eigenvectors from the eigenmax function represent the reproductive value (Equation 8) and stable distribution (Equation 9) in a metapopulation context (Ovaskainen and Hanski, 2003).
The amount of connected habitat for each pixel can easily be integrated over the whole landscape to compute such metrics similar to the ‘probability of connectivity’ (Saura and Pascual-Hortal, 2007) or the ‘equivalent connected habitat’ (Saura et al., 2011), which allows the assessment of the amount of habitat lost due to movement constraints and barriers (e.g. Equation 7). In ConScape, metrics identical to earlier work (Saura and Pascual-Hortal, 2007; Saura et al., 2011) can be computed efficiently using the least-cost distance (least_cost_distance), instead of the RSP expected cost, see Notebook A.5 in Appendix for demonstration.
3.4 Step 4: Movement flow
In the ConScape library, two variants of the movement flow through a node are computed: (a) the quality-weighted betweenness (betweenness_qweighted), (b) the proximity-weighted betweenness (betweenness_kweighted, see Figure 2 for an illustration). The quality-weighted betweenness of a pixel is the cumulative number of paths connecting all pairs of pixels passing through a pixel, where the paths are weighted by the RSP distribution and by the quality of the source and target of a pair. The proximity-weighted betweenness is similar to the quality-weighted one, but paths are also weighted by the proximity between source and target (in addition to their qualities).
The parameter controls the randomness of the distribution over paths from random () to optimal (), see Figure 3 and Appendix B. While choosing the ‘right’ value of is challenging and falls outside the scope of this presentation, see van Moorter et al. (2021) and Kivimäki et al. (2020) for a discussion, the possibility to easily explore the role of for landscape connectivity is a major contribution from the ConScape library.
3.5 Step 5: Enhancing performance
In our test example, we found that even a relatively coarse representation of the target qualities led to reasonable approximation of the amount of connected habitat both at the pixel level (from Equation 5 in Section 3.3, see Figure 4b) and landscape level (from Equation 7 in Section 3.3, see Figure 4a). Also the movement flow both quality-weighted (from Section 3.4, see Figure 4b) and proximity-weighted (from Section 3.4, see Figure 4b) were estimated well using relatively few landmarks. With about 100 landmarks or more (neighbourhood size 10 pixels), the relative amount of connected habitat and movement flow among pixels were estimated well, and with about 400 landmarks or more (neighbourhood size 5 pixels) the landscape-level amount connected habitat was approximated within 1% tolerance. However, this is still an approximation and we have to be cautious, we encourage users to share their experiences from other applications.
Computing the GridRSP for the demonstration landscape ( pixels) took approximately 6.5 s and importantly required nearly 2 Gb of RAM memory, whereas using landmarks with a neighbourhood size of 5 pixels this took 0.6 s with less than 100 Mb of RAM and a neighbourhood size of 10 pixels took 0.4 s with only 30 Mb of RAM. Thus, the use of landmarks substantially improved computational performance on our demonstration landscape at relatively limited loss in accuracy of the estimated quantities.
4 DISCUSSION
Due to the availability of high-resolution landscape representations from remote sensing (Pettorelli et al., 2016), landscape ecology has entered the field of large data (Farley et al., 2018). This has brought with it enormous potential for data-driven biodiversity conservation and mitigation of human land use throughout the mitigation hierarchy (from avoidance, over minimization and restoration, to offsetting: Arlidge et al., 2018). However, landscape-level integration of the effects of habitat loss and fragmentation is computationally challenging for such high-resolution landscapes. Landscape-level analysis requires the consideration of connectivity among all pairs of pixels (Hanski, 1999; Hanski and Ovaskainen, 2000). Not surprisingly, computational challenges have been a key barrier to previous approaches, with modellers adopting patch-matrix representations or low-resolution raster-based representations to reduce the number of source and target nodes in the landscape network. Unfortunately, the use of coarser landscape representations may bias the permeability of the landscape to movements (Ciudad et al., 2021) and fail to identify actual movement corridors (Zeller et al., 2017; Anantharaman et al., 2020). The ConScape library allows researchers to analyse landscapes at previously inaccessible resolutions by adopting the open-source, high-level, high-performance, dynamic programming language Julia (Bezanson et al., 2017), usage of efficient algorithms (Kivimäki et al., 2014) and through the implementation of a ‘landmark’ approach.
The landmark approach, in particular, allows ConScape to dramatically reduce the computational and memory requirements with only limited loss in accuracy. Conceptually, this landmark approach corresponds to a mixed-resolution representation of the landscape, that is, a high-resolution landscape of source pixels is connected to a lower resolution landscape of target pixels though a high-resolution permeability landscape. This mixed resolution allows ConScape to preserve the high-resolution necessary for accurate connectivity modelling (Zeller et al., 2017), while reducing redundancy from autocorrelation among neighbouring pixels. Despite the remarkable results obtained using the landmark approach, it is no silver bullet. The landmark approach worked particularly well to compute the amount of target habitat connected to a source pixel, where impressive computational gains could be made with limited loss in accuracy; the loss in accuracy was more rapid when computing the movement flow through pixels. Unfortunately, not all metrics can be computed using this approach, for instance, eigenanalysis requires a square matrix. Another solution to reduce memory and processing requirements is to split the computation using moving windows, as in Omniscape (Landau et al., 2021), which in Julia can also take advantage of its great support for parallel computing to further increases performance (Hall et al., 2021).
Several other software packages and libraries exist for connectivity modelling (see Appendix E for performance comparisons). Both Conefor (Saura and Torne, 2009) and Circuitscape (McRae et al., 2008) provided the conceptual foundation for ConScape, the name of it is testimony to this legacy. In particular, ConScape shares the focus of Conefor on quantifying the amount of connected habitat of a landscape (Saura and Pascual-Hortal, 2007; Saura and Torne, 2009). However, due to the computational limitations of Conefor, it can only be used on relatively small graphs (i.e. a limited number of patches or pixels). Circuitscape's main focus is on the quantification of movement flows on high-resolution landscapes using circuit theory for a relatively small number of nodes. Its current implementation does not allow the efficient computation of the amount of connected habitat from resistance distances between all pixel pairs. Hence, ConScape integrates functionalities from both libraries, and extends them using the RSP framework to model connectivity for movements on a continuum from optimal to random (van Moorter et al., 2021).
Several future directions are anticipated. For instance, although the current code can be relatively easily extended for computation using moving windows, convenience functions to make this approach accessible to a larger group of users are being tested. Another future direction is the development of computationally efficient approaches to quantify the importance of pixels for the amount of connected habitat in the landscape. For connectivity conservation and restoration, it is of paramount importance to identify those pixels whose removal or improvement would have the largest impact on the amount of connected habitat in the landscape or population persistence (Ovaskainen and Hanski, 2003; Ovaskainen, 2003; McRae et al., 2012; Hodgson et al., 2016). Unfortunately, as mentioned above, the tools currently available (i.e. ‘sensinode’ in Conefor, and its counterpart ‘criticality’ in ConScape) are computationally only suitable for relatively small graphs, as they iteratively remove each pixel in the landscape and recompute the amount of connected habitat. More efficient approaches for spatial conservation prioritization could build upon the observed relationship between a patch's betweenness in the landscape network and its priority rank for conservation and prioritization (Hodgson et al., 2016). Finally, another important avenue of future research is the issue of uncertainty and error propagation. The field of connectivity modelling is still in the phase of developing methods and tools to prioritize areas for connectivity conservation and restoration; however, as these tools mature it will become crucial to not only prioritize but also quantify the uncertainty associated with this prioritization. The quantification of this uncertainty will likely be a sobering experience for most connectivity modellers, but it will also increase its legitimacy for actual policy making. All these and other future developments will benefit greatly from contributions to ConScape's open source code both from the landscape connectivity modelling community, but also more generally from network sciences in a wide range of applications thanks to ConScape's two-layered structure for grids and for general graphs.
5 CONCLUSIONS
While we are facing an unprecedented loss in biodiversity due to anthropogenic landscape changes, we are simultaneously also gaining access to an unprecedented amount of data (e.g. remote sensing, animal tracking and citizen science data for biodiversity) to provide the knowledge basis to help us mitigate these effects throughout the mitigation hierarchy (Arlidge et al., 2018). However, tools to quantify the combined effects of anthropogenic habitat loss and fragmentation on high-resolution landscape representations have not been available so far. From the collaboration of ecologists, mathematicians and network scientists and software developers, the ConScape library presented in this paper provides the first such library, which allows the computation of the amount of connected habitat both at the level of a pixel and for the landscape as a whole. In particular, the landscape-level integration of connected habitat is well-suited as a single metric to characterize landscapes for a species and compare different scenarios of future landscape changes due to anthropogenic land use, climate change or alternative mitigation actions. Hence, the ConScape library is well-suited to leverage ‘large data’ for cumulative impact studies, and the evaluation and ranking of mitigation and off-set actions.
ACKNOWLEDGEMENTS
The work was supported by the grant 287925 from the Research Council of Norway. We thank two anonymous reviewers for their insightful comments on this work.
AUTHORS' CONTRIBUTIONS
B.V.M., I.K., R.D., M.P. and M.S. conceived the idea; B.V.M., I.K., R.D. and A.N. designed the library; I.K., P.L. and M.S. developed the algorithms; I.K. and R.D. prototyped the library; A.N. and I.K. implemented the library in Julia; B.V.M. analysed the data; B.V.M. led the writing of the manuscript with equal contributions from K.R.H., M.P., I.K. and M.S. All authors contributed critically to the drafts and gave final approval for publication.
Endnote
Open Research
PEER REVIEW
The peer review history for this article is available at https://publons.com/publon/10.1111/2041-210X.13850.
DATA AVAILABILITY STATEMENT
The ConScape library is open-source and hosted at https://github.com/ConScape/ or available from van Moorter et al. (2022).