Corridor (Spatial Analyst)

License Level:BasicStandardAdvanced

Summary

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

Learn more about creating a least cost corridor

Usage

Syntax

Corridor (in_distance_raster1, in_distance_raster2)
ParameterExplanationData 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.

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"

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# 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")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires Spatial Analyst
ArcGIS for Desktop Standard: Requires Spatial Analyst
ArcGIS for Desktop Advanced: Requires Spatial Analyst
4/10/2014