[GRASS-dev] [grass-code R][338] different sampling methods

Hamish hamish_nospam at yahoo.com
Tue Mar 20 04:06:53 EDT 2007


grass-coder wald.intevation org wrote:
> code R item #338, was opened at 2007-03-19 15:00
..
> Summary: different sampling methods 
..
> beside v.random or r.random to set points for latter analysis into an
> area other options would be very handy:
> 
> - sampling every 10th point of raster

use the modulus operator with r.mapcalc.

r.mapcalc ... \
  if( ((row() % 10) == 0) && ((col() % 10) == 0), map, null() )

?

> - linear sampling: small areas have less points than larger areas

well, they do have points proportial to area already.
Do you mean proportional to area^2 or so?
(sorry for the basic question, I'm not a stats person)


Hamish




More information about the grass-dev mailing list