2

I have time-series data (rasters) from which I need to calculate the direction of change (increase, no change or decrease) for every pixel from one time-step to the next. I further need an output where an increase is assigned a value of +1, no change is assigned a 0 and a decrease is assigned a value of -1 in the output raster. Not sure how I should go about this as I have thus far not been successful. Please help.

Barbarossa
  • 5,797
  • 27
  • 61
Yolandi
  • 41
  • 4
  • This sounds like a regression problem. More information here: 1) http://gis.stackexchange.com/questions/52502/how-to-represent-trend-over-time 2) http://video.esri.com/watch/1949/performing-regression-analysis-using-raster-data – Aaron Mar 05 '14 at 13:59
  • @Aaron; I briefly went through the suggested post and I will definitely have a more thorough look when I get a chance. – Yolandi Mar 05 '14 at 14:48

1 Answers1

1

here is what you can do for a single raster :

Con ("raster1" == "raster2", 0, Con("raster1" < "raster2" , 1 , -1) )  

now for your time series, you will need to loop on all bands. But the code will depend on the software used.

radouxju
  • 49,636
  • 2
  • 71
  • 144
  • Thank you radouxju. I tried the suggested expression but the output raster still didn't meet my expected result. You did however send me in the right direction and I finally ended up using the expression: Con("raster2">"raster1",1,Con("raster2"<"raster1",-1,0)). Working in ArcGIS 10.1. – Yolandi Mar 05 '14 at 14:34