[GRASS-user] Selecting n cells more then minDist apart
Rainer M Krug
r.m.krug at gmail.com
Wed Jan 25 06:10:28 EST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I need to select n cells on a raster map with no cell closer then
minDist from any other selected cell. The distances can be larger - no
problem - but they must not be smaller then minDist.
I looked at r.random.cell with using distance= as the min distance,
but if I select randomly n cells from the set generated, I get cells
with a multiple of minDist apart - not exactly what I am looking for.
I could use r.random and iterate until my requirements are met, but
that strikes me as extremely inefficient. Are thare any other ways of
achieving this?
As I am doing the calculations from R, I could also easily use R directly.
Any pointers are welcome,
Rainer
- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer at krugs.de
Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8f4yQACgkQoYgNqgF2egrvMwCdEhDN8LR/Eu/wXrsqxcWdJNsE
BtIAnjgOvI/eBMKW74NEWkrWYYgDoEJJ
=MQFz
-----END PGP SIGNATURE-----
More information about the grass-user
mailing list