Showing posts with label least-cost paths. Show all posts
Showing posts with label least-cost paths. Show all posts

Wednesday, November 3, 2021

New tool - Multiple Shortest Paths in ArcGIS

 

Least-cost paths have received widespread use in fields that aim to understand how people, animals, and particles might move across landscapes. In ecology least-cost paths have been used to examine connectivity of individuals, propagules, and genes, as well as serve as the basis for many corridor-building applications for the purpose of conserving habitat. Adriaensen et al. (2003) introduced the concept into ecology as an alternative to Euclidean distance and provided examples from the Belgian landscape. Using a heterogeneous raster-based landscape in which digital maps (rasters) are assigned cost distances (also known as resistance) the least-cost path uses Dijkstra’s algorithm to identify the shortest path in terms of cumulative cost/resistance. The algorithm identifies a single least-cost path that is one cell wide.  In an ecological context this assumes that the animal/propagule has sufficient knowledge of the landscape to identify and follow that “best” path. Pinto and Keitt (2009) identified that in many cases organisms don’t have perfect knowledge of their environment and that multiple realizations of the shortest path may be necessary to account for variability in movement. Their approach was to develop stochastic, rather than static, realizations of the least-cost path, which they implemented in Java software LORACS (no longer available) (Pinto et al. 2012).

McRae et al. (2007) introduced the idea of using circuit theory is used to model dispersal behavior.  Unlike a single least-cost path circuit theory models the dispersal of many organisms/electrons resulting in multiple paths across the landscape. Movement is based on random walk theory and is proportional to the resistance/cost surface. Circuit theory, unlike a least-cost path, doesn’t assume that an organism would have perfect knowledge of its landscape. Circuit theory has received widespread use in ecology (Dickson et al. 2019) and has been used to understand gene flow across landscapes, model animal movements, and develop conservation corridors. However, outputs from circuit theory provide the user with little control and can sometimes be difficult to translate into corridors.

The randomized shortest-path was introduced by Saerens et al. (2009) and has been implemented in the R package gdistance (Van Etten 2020). The randomized shortest-path approach bears many similarities to the multiple shortest paths approach of Pinto and Keitt (2009), of which the ability to control the level of randomization is among the most important features. In the gdistance package this is done by controlling the theta parameter. The Multiple Shortest Paths Toolbox for ArcMap is built on these ideas while providing similar functionality in an ArcGIS environment.

 You can download the toolbox by clicking HERE.

Adriaensen, F., Chardon, J. P., De Blust, G., Swinnen, E., Villalba, S., Gulinck, H., & Matthysen, E. (2003). The application of ‘least-cost’modelling as a functional landscape model. Landscape and Urban Planning, 64(4), 233-247. 

Dickson, B. G., Albano, C. M., Anantharaman, R., Beier, P., Fargione, J., Graves, T. A., ... & Theobald, D. M. (2019). Circuit‐theory applications to connectivity science and conservation. Conservation Biology, 33(2), 239-249.

McRae, B. H., & Beier, P. (2007). Circuit theory predicts gene flow in plant and animal populations. Proceedings of the National Academy of Sciences, 104(50), 19885-19890. 

Pinto, N., & Keitt, T. H. (2009). Beyond the least-cost path: evaluating corridor redundancy using a graph-theoretic approach. Landscape Ecology, 24(2), 253-266.

Pinto, N., Keitt, T. H., & Wainright, M. (2012). LORACS: JAVA software for modeling landscape connectivity and matrix permeability. Ecography, 35(5), 388-392.

Saerens, M., Achbany, Y., Fouss, F., & Yen, L. (2009). Randomized shortest-path problems: Two related models. Neural Computation, 21(8), 2363-2404. 

Van Etten, J.M. (2020). Package ‘gdistance’. R package version 1.1-2.

 

Monday, December 7, 2020

New tool - Count Coincident Lines

I have a new ArcGIS geoprocessing tool out called  Count Coincident Lines on ArcGIS Online or by clicking HERE.

Sometimes we want to know the number of coincident line features in a feature class. For example, perhaps we are interested in the movement of organisms on a landscape and we have multiple least-cost path lines that we are interested in depicting using varying line widths or colors.



 

 

 

 

 

Figure 1: Lines are overlapping so it isn’t possible to depict which segments are coincident with others.




 

 

 

 

 

Figure 2: Line widths depict the number of coincident lines.

Parameters

The tool has only four parameters and does not create any intermediate files.

Input Lines  - The input lines parameter should have multiple coincident line features and should have a projected coordinate system.

Coordinate system – This is the native coordinate system of the input lines. (Right click on the layer – Properties – Source - Projected Coordinate System).

Length unit – The native length unit of the input lines (Right click on the layer – Properties – Source – Linear Unit).

Output Lines – Output line shapefile or geodatabase feature class.


 

 

 

 

 

Figure 3: Dialog for the Count Coincident Lines tool.

Model

The model consists of four simple steps and uses tools that only require a Basic ArcGIS license. The first step uses the Add Geometry Attributes tool to add the START_X, START_Y, MID_X, MID_Y, END_X, END_Y. These are reserved fields and should not be present in the input lines.

Next, the model adds a field called COUNT (also a reserved field)  and calculates count such that each line segment has a values of 1.

Finally, the tool dissolves based on the START_X, START_Y, MID_X, MID_Y, END_X, END_Y assuming that lines with these six values in common are coincident.  There may be circumstances where this assumption is violated so please think carefully about whether this is true for your data or not.

The number coincident segments per line is shown in the COUNT_COUNT field (also reserved) and can be depicted on a map like in Figure 2.



 

 

Figure 4: Count Coincident Lines tool as viewed from Model Builder (right click - edit).

Citation

Dilts, T.E. (2020) Count Coincident Lines Toolbox for ArcGIS. University of Nevada Reno. Available at: https://www.arcgis.com/home/item.html?id=6b0d7669d7ea4cc3b62ecddea209c251