main direction in 2D map of data It may be a very simple question. We would appreciate any comments, guide or complete solution. We prefer however incomplete solutions but novel practical ideas.
 - How to find the main direction of variation i.e., main diagonal in the following example figure (north-east,south-west)?
Any algorithm and idea for coding or snippet is welcome.



Updates:
We found that the procedure mentioned in the accepted answer is almost PCA (Principal Component Analysis) in its simplest implementation. PCA worked very well. The resulting direction is perfectly matched with what we could expect, visually.
You could compute the covariance matrix from your elevation data. The eigenvector that belongs to the larger eigenvalue will give you the main direction of variation:

http://en.wikipedia.org/wiki/Covariance_matrix