| os_run | R Documentation |
Performs an Omniscape analysis, computing omnidirectional landscape connectivity using a moving window approach based on circuit theory.
os_run(
resistance,
radius,
source_strength = NULL,
block_size = 1L,
source_threshold = 0,
r_cutoff = Inf,
resistance_is = "resistances",
calc_normalized_current = TRUE,
calc_flow_potential = TRUE,
condition = NULL,
condition_type = NULL,
parallelize = FALSE,
julia_threads = 2L,
solver = "cg+amg",
output_dir = NULL,
verbose = FALSE
)
resistance |
A terra::SpatRaster or file path. The resistance (or conductance) surface. Higher values represent greater resistance to movement. |
radius |
Numeric. Moving window radius in pixels. This determines the maximum distance over which connectivity is evaluated from each source pixel. |
source_strength |
Optional terra::SpatRaster or file path. Source
strength weights, often derived from habitat quality or suitability, where
higher values indicate stronger sources of movement. If |
block_size |
Integer. Aggregation block size for source points. Default
|
source_threshold |
Numeric. Minimum source strength to include a pixel.
Default |
r_cutoff |
Numeric. Maximum resistance value for a cell to be included
as a source when |
resistance_is |
Character. Whether the resistance surface represents
|
calc_normalized_current |
Logical. Compute normalized current flow.
Default |
calc_flow_potential |
Logical. Compute flow potential. Default |
condition |
Optional terra::SpatRaster or file path. Conditional layer for targeted connectivity analysis. |
condition_type |
Character. How the condition layer filters connectivity:
|
parallelize |
Logical. Use Julia multithreading. Default |
julia_threads |
Integer. Number of Julia threads if |
solver |
Character. Solver to use: |
output_dir |
Optional character path. If provided, output files persist
there. Default |
verbose |
Logical. Print Omniscape output. Default |
A terra::SpatRaster with the following layers (depending on options):
Raw cumulative current flow. Always present. Higher values indicate cells that carry more current across all moving-window iterations.
Expected current under homogeneous resistance
(if calc_flow_potential = TRUE). Reflects the spatial configuration
of sources independently of landscape resistance.
Cumulative current divided by flow potential
(if calc_normalized_current = TRUE). Values greater than 1 indicate
cells where connectivity is higher than expected given the source
geometry; values less than 1 indicate relative barriers. This is
typically the most informative layer for identifying corridors and
pinch points.
Landau, V.A., Shah, V.B., Anantharaman, R. & Hall, K.R. (2021). Omniscape.jl: Software to compute omnidirectional landscape connectivity. Journal of Open Source Software, 6(57), 2829. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.21105/joss.02829")}
Omniscape.jl: https://docs.circuitscape.org/Omniscape.jl/latest/
cs_pairwise(), cs_setup()
library(terra)
res <- rast(system.file("extdata/resistance.tif", package = "circuitscaper"))
result <- os_run(res, radius = 20)
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.