廊道分析 (空间分析)

摘要

计算两个输入累积成本栅格的累积成本总和。

了解有关创建最小成本廊道的详细信息

用法

语法

Corridor (in_distance_raster1, in_distance_raster2)
参数说明数据类型
in_distance_raster1

第一个输入距离栅格。

它应是来自距离工具的累积成本距离输出,如成本距离路径距离

Raster Layer
in_distance_raster2

第二个输入距离栅格。

它应是来自距离工具的累积成本距离输出,如成本距离路径距离

Raster Layer

返回值

名称说明数据类型
out_raster

输出廊道栅格。

Raster

代码示例

“廊道”示例 1(Python 窗口)

以下 Python 窗口脚本演示了廊道分析工具的使用方法。

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")
“廊道”示例 2(独立脚本)

计算两个已知保护区域之间的野生动物廊道。

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

环境

相关主题

许可信息

ArcView: 需要 Spatial Analyst
ArcEditor: 需要 Spatial Analyst
ArcInfo: 需要 Spatial Analyst

7/10/2012