Available with Spatial Analyst license.
Summary
Calculates the sum of accumulative costs for two input accumulative cost rasters.
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.
Syntax
Corridor (in_distance_raster1, in_distance_raster2)
Parameter | Explanation | Data 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
Name | Explanation | Data 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"
# 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
Licensing Information
- ArcGIS for Desktop Basic: Requires Spatial Analyst
- ArcGIS for Desktop Standard: Requires Spatial Analyst
- ArcGIS for Desktop Advanced: Requires Spatial Analyst