NDSI

摘要

计算多波段栅格对象的归一化差分雪盖指数 (NDSI),并返回具有该指数值的栅格对象。

说明

归一化差分雪盖指数 (NDSI) 用于在忽略云覆盖的情况下,使用 MODIS(波段 4 和波段 6)和 Landsat TM(波段 2 和波段 5)识别雪覆盖。因为该指数为比值型,所以同样会减轻大气效应。

 NDSI = (Green - SWIR) / (Green + SWIR)

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

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

语法

NDSI (raster, {green_band_id}, {swir_band_id})
参数说明数据类型
raster

The input raster.

Raster
green_band_id

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

(默认值为 4)

Integer
swir_band_id

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

(默认值为 6)

Integer
返回值
数据类型说明
Raster

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

代码示例

NDSI 示例

计算 Landsat 8 图像的归一化差分雪盖指数。

from arcpy.sa import *
out_ndsi_raster = NDSI("landsat8.tif", 4, 6)
out_ndsi_raster.save("C:/arcpyExamples/outputs/NDSI.tif")
NDSI 示例

计算 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"

# Execute NDSI function
out_ndsi_raster = NDSI(in_raster, 4, 6)

# Save the output
out_ndsi_raster.save("C:/arcpyExamples/outputs/NDSI.tif")

相关主题