Corridor (Spatial Analyst)

Available with Spatial Analyst license.

Summary

Calculates the sum of accumulative costs for two input accumulative cost rasters.

Learn more about connecting locations with corridors

Usage

  • While any two rasters can be used for the input, to obtain a meaningful result they should be unaltered accumulative cost output rasters.

  • The order of the two inputs is irrelevant.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

Parameters

LabelExplanationData Type
Input cost distance raster 1

The first input distance raster.

It should be an accumulated cost distance output from a distance tool such as Cost Distance or Path Distance.

Raster Layer
Input cost distance raster 2

The second input distance raster.

It should be an accumulated cost distance output from a distance tool such as Cost Distance or Path Distance.

Raster Layer

Return Value

LabelExplanationData Type
Output raster

The output corridor raster.

The output raster is of floating-point type.

Raster

Corridor(in_distance_raster1, in_distance_raster2)
NameExplanationData Type
in_distance_raster1

The first input distance raster.

It should be an accumulated cost distance output from a distance tool such as Cost Distance or Path Distance.

Raster Layer
in_distance_raster2

The second input distance raster.

It should be an accumulated cost distance output from a distance tool such as Cost Distance or Path Distance.

Raster Layer

Return Value

NameExplanationData Type
out_raster

The output corridor raster.

The output raster is of floating-point type.

Raster

Code sample

Corridor example 1 (Python window)

The following Python Window script demonstrates how to use the Corridor tool.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outCorr = Corridor("costraster", "focalcost.tif")
outCorr.save("c:/sapyexamples/output/corridor")
Corridor example 2 (stand-alone script)

Calculate a wildlife corridor between two known protected areas.

# Name: Corridor_Ex_02.py
# Description: Calculate a potential wildlife corridor between 
#              two known protected areas.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inCostRaster = "costdist01"
nextCostRaster = "cotdist02"

# Execute Corridor
outCorridor = Corridor(inCostRaster, nextCostRaster) 

#Limit the corridor to a threshold to show a potential corridor
corridor = Con(outCorridor, 1, 0, "VALUE < 100")

# Save the output 
outCorridor.save("C:/sapyexamples/output/costout")

Licensing information

  • Basic: Requires Spatial Analyst
  • Standard: Requires Spatial Analyst
  • Advanced: Requires Spatial Analyst

Related topics