Я нашел метод для вычисления уклонов по временным рядам растров, который показан здесь .Результат идеален, так как он действительно быстрый, и результатом является растр склонов, как я и хотел.Это код:
from __future__ import division
import arcpy
import os
from arcpy import env
from arcpy.sa import*
# define workspace
arcpy.env.workspace=r"C:/Users/..."
# enable overwriting
arcpy.env.overwriteOutput=True
# check spatial analyst extension
arcpy.CheckOutExtension('Spatial')
# define output paths
slopePath=r"C:/Users/....gdb"
# list all rasters in the workspace
rasters=arcpy.ListRasters('*')
# sort rasters numerically
rasters.sort()
# get the number of rasters
n=len(rasters)
print(n)
# setup index
i=1
# define division
seed=(n*n*n)-n
print('the global seed is {0}'.format(seed))
for raster in rasters:
print(i)
coef=(12*(i)-((6*n)+(6*1)))/seed
print('Raster {0} is {1}:'.format(i,raster))
print('the coef for raster {0} is {1}'.format(i,coef))
# Multiple raster by coefficient
if i==1:
outSlope=(Raster(raster)*coef)
i+=1 # same as saying i=i+1
else:
print('adding {0} to outSlope'.format(raster))
outSlope=outSlope+(Raster(raster)*coef)
i+=1
if i==6:
break
# Save final slope grid
print('saving final slope grid')
outSlope.save(slopePath + "/" + "EVIChange_py")
print('script is complete')
Мой вопрос: есть ли способ построить простой график, подобный первому , в этой теме , чтобы я мог представлять результаты по-разному.Я не знаком с arcpy
, поэтому я не смог найти способ сделать это.