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.
-
This sounds like a regression problem. More information here: 1) gis.stackexchange.com/questions/52502/… 2) video.esri.com/watch/1949/…– Aaron ♦Commented Mar 5, 2014 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.– YolandiCommented Mar 5, 2014 at 14:48
Add a comment
|
1 Answer
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.
-
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.– YolandiCommented Mar 5, 2014 at 14:34