[GRASS-dev] GRASS r.neighbors

Benjamin Ducke benjamin.ducke at oxfordarch.co.uk
Wed Jul 23 04:54:10 EDT 2008


I wrote a little module that does this sort of calculation a while ago.
If I remember right, it worked reasonably well and also does
normalization either by neighborhood or map maximum. I have attached
the code and Makefile.

Have fun with it,

Ben


chris carleton wrote:
> I've encountered another challenge with GRASS that I need some expert 
> advice with. I want to run a neighborhood analysis on a few DEMs, but 
> the options in r.neighbors don't quite seem to suit my needs. I want an 
> analysis that calculates the average difference between the central cell 
> and its neighbors (using that average as the new cell cat value). The 
> idea is that I'll end up with an approximation of terrain 'ruggedness' 
> by looking at average differences in elevation within a given 
> neighborhood. Any suggestions would be welcome.
> 
> Chris
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
	

-- 
Benjamin Ducke
Senior Applications Support and Development Officer

Oxford Archaeological Unit Limited
Janus House
Osney Mead
OX2 0ES
Oxford, U.K.

Tel: +44 (0)1865 263 800 (switchboard)
Tel: +44 (0)1865 980 758 (direct)
Fax :+44 (0)1865 793 496
benjamin.ducke at oxfordarch.co.uk





------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 12695 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080723/07f7efd1/main-0001.bin
-------------- next part --------------
MODULE_TOPDIR = ../..

PGM = r.prominence

GTLIB = -lgt
LIBES = $(GISLIB) $(DATETIMELIB)
EXTRA_CFLAGS = -I../dst/include \
	       

include $(MODULE_TOPDIR)/include/Make/Module.make

default: cmd


More information about the grass-dev mailing list