用于NPP(净初级生产)百分比变化的Python脚本
您能为百分比变化光栅从“开始年”(Inras1)到“结束年”(Inras2)的植被净初级生产光栅提供一个python脚本吗?示例:这是一个给定的光栅单元,与“开始年份”相比增加了25%用于NPP(净初级生产)百分比变化的Python脚本,python,raster,Python,Raster,您能为百分比变化光栅从“开始年”(Inras1)到“结束年”(Inras2)的植被净初级生产光栅提供一个python脚本吗?示例:这是一个给定的光栅单元,与“开始年份”相比增加了25% `请出示一些研究的证据以及您迄今为止所做的尝试。 # Name: Minus_Ex_02.py # Description: Modification of ESRI's Subtracts the value of the second input raster f
`请出示一些研究的证据以及您迄今为止所做的尝试。
# Name: Minus_Ex_02.py
# Description: Modification of ESRI's Subtracts the value of the second input raster from the Value of the first input raster on a cell-by-cell basis
# Requirements: Spatial Analyst Extension
# Author: ESRI
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set environment settings
env.workspace = "C:/Users/Kaleab/Desktop/MOD17A3/Mosaic/Clip"
# Set local variables
inRaster1 = "2000clip.tif"
inRaster2 = "2010clip.tif"
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
# Execute Minus
outMinus = Minus(inRaster1, inRaster2)
changeras = outMinus/inRaster1
# Save the output
changeras.save("C:/Users/Kaleab/Desktop/MOD17A3/Mosaic/Clip/Change.tif")