Skip to main content
3 of 3
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/

Using technique described here I populated the table of integer grid by values from 3 rasters of interest.

I used IS NULL query to populate records with no match (NO DATA) by -999 during data transfer from zonal statistics table. Finally I added field “SLOPE” and computed it using Python field calculator expression: import numpy

def getSlope(yList):
    x,y=[],[]
    years=[1984, 1990, 1991, 1992, 1996, 2002, 2006, 2011, 2013,2016]
    for i,v in enumerate(yList):
        if v==-999:continue
        x.append(years[i]);y.append(v)
    ab=numpy.polyfit(x, y, 1)
    return ab[0]
#------------------------------
getSlope([ !GRD_01!, !GRD_2!, !GRD_03!])

Assuming time interval between rasters is the same.

RESULT:

enter image description here

NOTE:

  • Values transfer and slope calculations both based on field calculator, which makes it a bit slow
  • Use LOOKUP in spatial analyst Reclass to convert SLOPE field to raster.
FelixIP
  • 23.3k
  • 3
  • 31
  • 62