[R-sig-Geo] Selecting n cells more then minDist apart
Rainer M Krug
r.m.krug at gmail.com
Thu Jan 26 13:15:12 CET 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 26/01/12 12:44, Brian wrote:
> Hi Rainer,
>
> how about aggregating to a lower resolution, where the cell center
> - cell center distances correspond to your minDist? Then sample as
> one would normally and then take the cell center coordinates from
> your sample back to your original raster.
Wouldn't work in my case, as the underlying raster on which I want to
sample, has sometimes single isolated cells, and it is important to
have a chance of sampling these as well in a later step. And if under
the aggregated resolution two of these isolated cells are in one
celll, there is a problem.
> A bit of geometry will tell you what the resolution needs to be
> and please tell me you are not sampling a longlat projection!
No - its a UTM grid.
I looked again at my application, and I realized as I can also set the
minimum distance, and then distribute the points. So I decided to use
the r.random.cells function and specify the distance.
My application is a sensitivity analysis, and it does not matter if I
change the distance which results in different number of cells
selected, or change the number of cells and then distribute them.
Thanks a lot for your help,
Rainer
>
> Either the r.region GRASS function or the aggregate 'raster'
> function should do.
>
> there's my cents/sense...
>
> HTH,
>
> Brian
- --
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/
iEYEARECAAYFAk8hQ9AACgkQoYgNqgF2egrNIgCfQOfcUPaF52CdABEyFRXCh06J
R04AoIsRTOo9eKX4zY9jUP17MjcT4N1U
=aEN9
-----END PGP SIGNATURE-----
More information about the R-sig-Geo
mailing list