[GRASS-user] Location of minimum value in raster

2011-08-03 Thread Joshua Arnott
Hi grass-users, Is there a convenient way to find the location of the minimum value in a raster, either as x,y coordinates or as a binary raster (1 = minimum, 0 = other)? I've looked, but haven't found anything obvious. Regards, Josh. ___

Re: [GRASS-user] Location of minimum value in raster

2011-08-03 Thread Hamish
Joshua wrote: Is there a convenient way to find the location of the minimum value in a raster, either as x,y coordinates or as a binary raster (1 = minimum, 0 = other)? I've looked, but haven't found anything obvious. two steps, eval `r.info -r data_map` to get min= r.mapcalc binary_map =

Re: [GRASS-user] Location of minimum value in raster

2011-08-03 Thread Soeren Gebbert
Hi, 2011/8/3 Hamish hamis...@yahoo.com: Joshua wrote: [snip] two steps, eval `r.info -r data_map` to get min= r.mapcalc binary_map = if(data_map == $min, 1, 0) or perhaps min from 'r.info -r' and coord(s) from grep'ing output of 'r.stats -1g'. perhaps you need to do abs(data_map - $min)

Re: [GRASS-user] Location of minimum value in raster

2011-08-03 Thread Saber Razmjooei
First make a 2nd copy of your raster r.info to get the value of minimum. r.null to null out all the values more than minValue + 0.01 (depends on the decimal values in your raster) through to maxValue. Cheers Saber Hi, 2011/8/3 Hamish hamis...@yahoo.com: Joshua wrote: [snip] two steps,

Re: [GRASS-user] Location of minimum value in raster

2011-08-03 Thread Joshua Arnott
Thanks everyone for the quick responses. I've managed to get what I needed. I've been trying to improve upon the stochastic modelling of watershed boundaries, as described in the r.stream.basins manual and Metz and Jasiewicz (2011, p. 1167). Instead of using an area as the catchment outlet, I