[GRASS5] Gaussian filter for GRASS -- second service
Jachym Cepicky
jachym.cepicky at centrum.cz
Fri Apr 22 10:00:42 EDT 2005
Hallo developers,
so I gave it some more time and tryed to work in all the comments from Glynn
and I hope, I can say, GRASS has its own Gaussian filter.
The module handels all the maps as DCELL map, it uses scrolling window
(scrolling rows), like r.neighbors or r.grow2 and it hopefully frees all the
buffers.
The first version, I posted into this list, is really bad and I would suggest
all of you, not to look at the code, it could hurt to your electronic cardiac
pacemaker.
I would like, if some one could have a look at the code, like Glynn did, and to
tell me, what one (me) could do better or if there is no bigger bug. It would
be very important for me, as this is the first modul, I wrote, and even first
C-program.
Comparison with r.mapcalc implementation:
-----------------------------------------
nsres: 0.5
ewres: 0.5
rows: 3332
cols: 3413
r.mapcalc |
(gaussian.pl at GRASS add-ons site):| r.gauss:
------------------------------------+-------------------
real 0m26.534s | real 0m8.482s
user 0m24.281s | user 0m7.787s
sys 0m0.898s | sys 0m0.437s
Which means, it is really faster :-)
Why did I write standalone module and why didn't I merge it with e.g.
r.neighbors:
1) I wanted to learn, how to write own modules in GRASS (this was the most
importand for me)
2) Gaussian filter needs parametr sigma on it's input - none of methods from
r.neighbors needs any other parametr - it would be unconsistent.
3) I hope to write some other tools for remote sensing. All the filters need
special parametres, so I personaly don't see the way, how to merge them into
one (two) big module(s) :-/
Gaussian filter is the simplest filter. I wrote it more from study reasons,
as that I would really need it for my work. But it is mentioned, as the
basic low pass filter.
I don't stand on, put my r.gaussian into CVS-tree. It can live on the GRASS
add-ons site (if not somewhere else). I would just please someone to check
my work, if there is someone who could give it some time ... sometimes :-)
Thank you
Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r.gauss.tgz
Type: application/x-gtar
Size: 11557 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20050422/207ec027/r.gauss.gtar
More information about the grass-dev
mailing list