[GRASS-user] r.neighbors velocity

Ivan Marchesini ivan.marchesini at gmail.com
Wed Jul 17 03:13:16 PDT 2013

Dear Soeren, Hamish, Markus M., Markus N,.
sorry for the delay in the answer but I didn't believe that my question
could have determined so many answers and I was on holiday for 10 days
with no way to test your code.
First of all a quick answer to Markus N.
My collegue is working on high resolution images and DEMs. In this case,
in particular, he is working on a 1 meter resolution raster map
concerning landslides. He said me that, due to the landslides
dimensions, he need to use a kernel of 501*501 in order to catch the
"signatures" of the phenomena (I don't know exactly the details.. I'm

I'm not a C developer but reading your e-mails it seems that the
performances of the C codes (and r.neigbors is written in C) strongly
depend on the compiler.
does it mean that compiling in a different way (I don't know how) the
r.neigbours module we can obtain better results?

We have tested the last code of Soeren in the same machine where the
proprietary software (it is ENVI 5.x) showed those good performances.  

These are the results:

gcc -Wall -fopenmp -lgomp -Ofast main.c -o neighbor
time ./neighbor 5000 5000 23
real    0m16.598s
user    0m16.477s
sys    0m0.080s

time ./neighbor 5000 5000 23
real    0m8.977s
user    0m17.573s
sys    0m0.080s

time ./neighbor 5000 5000 23
real    0m5.993s
user    0m20.277s
sys    0m0.088s

time ./neighbor 5000 5000 23
real    0m4.784s
user    0m25.770s
sys    0m0.096s

Many thanks for your answers

More information about the grass-user mailing list