无效值为 -3000,使用setNull函数来执行
# -*- coding: utf-8 -*-
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("ImageAnalyst") #检查许可
arcpy.CheckOutExtension("spatial") #检查许可
whereClause = "VALUE = -3000" #无效值
inRaster=r'G:\MOD13A3_NDVI\MaxMonth_NDVI\2002_MaxNDVI.tif' #输入栅格数据
outSetNull = SetNull(inRaster, inRaster, whereClause) * 0.0001 #去除无效值并乘以0.0001
outname=r"G:\MOD13A3_NDVI\去除无效值\try1.tif" #输出路径
outSetNull.save(outname) #保存数据
print 'over'