[GRASS-user] Accessing a z-profile...

Jonathan Greenberg greenberg at ucdavis.edu
Fri May 30 19:06:42 EDT 2008


We're interested in working within GRASS to do some spectral analyses, 
but we need to be able to access a z-profile programatically, more or 
less on a pixel-by-pixel basis (e.g. we don't think we can use r.mapcalc 
to solve our problems).  Here's a for instance, and let me know if this 
is doable with existing commands and, if not, if there are standard 
GRASS "z-profile" access techniques:

For an image of B bands (in grass, I think this is represented as 
rastername.bandnumber), we want to calculate a weighted average of the 
bands which are, say, the 5 highest values in the stack.  Which 5 bands 
are the highest will change from pixel to pixel. 

On an array level, this is a sort function, but is there any algorithm 
already built into GRASS that can deal with pixel-level sorting (and use 
in mapcalc) and, if not, are there some good example code for access 
pixel-by-pixel an image and performing some sort of function on this stack.

I hope this was clear enough.  Thanks!

--j

-- 
Jonathan A. Greenberg, PhD
Postdoctoral Scholar
Center for Spatial Technologies and Remote Sensing (CSTARS)
University of California, Davis
One Shields Avenue
The Barn, Room 250N
Davis, CA 95616
Cell: 415-794-5043
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307



More information about the grass-user mailing list