[GRASS-user] Location of minimum value in raster
Soeren Gebbert
soerengebbert at googlemail.com
Wed Aug 3 09:10:13 EDT 2011
Hi,
2011/8/3 Hamish <hamish_b at 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) < 0.0000001" for
> the equivalence test in r.mapcalc, or some similar awk test
> from the printf() formatted output of r.stats.
>
> perhaps you need to do r.buffer from the binary map to make the
> single pixel(s) easier to locate.
>
> d.rast with the cat or value list option might quickly do it too,
> but a single cell might not visibly render.
Maybe you can convert the resulting raster map into vector points for
visualization and further processing?
Soeren
More information about the grass-user
mailing list