Skip to main content

NDBI

汇总

计算多波段栅格对象的归一化差值建筑用地指数 (NDBI),并返回具有该指数值的栅格对象。

讨论

归一化差值建筑用地指数 (NDBI) 使用 NIR 和 SWIR 波段来突出生产建筑用地面积。 该指数为比值型,可减轻地形光照差异的影响以及大气效应。

\(NDBI \space = \space (SWIR \space - \space NIR) \space / \space (SWIR \space + \space NIR)\)

有关其他多波段栅格索引的信息,请参见 Band Arithmetic 栅格函数。

栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。

语法

NDBI(raster, {swir_band_id}, {nir_band_id})

参数 说明 数据类型

raster

The input raster.

Raster

swir_band_id

The band ID of the shortwave infrared band. The ID index uses one-based indexing.

(默认值为 6)

Integer

nir_band_id

The band ID of the near-infrared band. The ID index uses one-based indexing.

(默认值为 5)

Integer

返回值

数据类型 说明

Raster

具有 NDBI 值的输出栅格对象。

代码示例

NDBI 示例

计算 Landsat 8 图像的归一化差值建筑用地指数。

from arcpy.sa import *
out_ndbi_raster = NDBI("landsat8.tif", 6, 5)
out_ndbi_raster.save("C:/arcpyExamples/outputs/NDBI.tif")
NDBI 示例

计算 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 NDBI function
out_ndbi_raster = NDBI(in_raster, 6, 5)

# Save the output
out_ndbi_raster.save("C:/arcpyExamples/outputs/NDBI.tif")