BAI
汇总
计算多波段栅格对象的燃烧面积指数 (BAI),并返回具有该指数值的栅格对象。
讨论
燃烧面积指数 (BAI) 使用光谱中红光和 NIR 部分的反射率值来识别受火灾影响的地形面积。
\(BAI \space = \space 1/((0.1 \space -RED)\textasciicircum 2 \space + \space (0.06 \space - \space NIR)\textasciicircum 2)\)
Red = 红光波段的像素值
NIR = 近红外波段的像素值
有关其他多波段栅格索引的信息,请参见 Band Arithmetic 栅格函数。
栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。
语法
BAI(raster, {red_band_id}, {nir_band_id})
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
raster |
The input raster. |
Raster |
|
red_band_id |
The band ID of the red band. The ID index uses one-based indexing. (默认值为 3) |
Integer |
|
nir_band_id |
The band ID of the near-infrared band. The ID index uses one-based indexing. (默认值为 4) |
Integer |
返回值
| 数据类型 | 说明 |
|---|---|
|
Raster |
具有 BAI 值的输出栅格对象。 |
代码示例
BAI 示例
计算 Landsat 8 影像的燃烧面积指数。
from arcpy.sa import *
out_bai_raster = BAI("landsat8.tif", 3, 4)
out_bai_raster.save("C:/arcpyExamples/outputs/BAI.tif")
BAI 示例
计算 Landsat 8 影像的燃烧面积指数。
# Import system modules
import arcpy
from arcpy.sa import *
# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"
# Set the local variables
in_raster = "landsat8.tif"
# Run BAI function
out_bai_raster = BAI(in_raster, 3, 4)
# Save the output
out_bai_raster.save("C:/arcpyExamples/outputs/BAI.tif")