I am trying to write some python code to calculate a change in Z value from one point to the next. I have a number of point files with Z values in a field called "RASTERVALU". I have a field called zdiff that I would like to update with " Zdiff(row1)=Z(row2)-Z(row1)". I can use the update cursor it to look at the backwards change (Zdiff(row1)=z(row1)-Z(row0)) but not the forward change (Zdiff(row1)=z(row1)-Z(row0)).
I used the following code below but it seems like the updaterow.next() is messing up my sequential flow through the rows.