In Grass maybe you could use the boundaries instead of the areas. The distances would be between the boundaries&#39; linestrings instead of centroids.<div><br></div><div>giovanni<br><br><div class="gmail_quote">2012/5/7 Roger Bivand <span dir="ltr">&lt;<a href="mailto:Roger.Bivand@nhh.no" target="_blank">Roger.Bivand@nhh.no</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, 7 May 2012, Rainer M Krug wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi<br>
<br>
I have the following (presumibly simple?) question:<br>
<br>
I have a certain number of patches (islands) in a landscape of which I need to know the nearest neighbour distance. As the problem is related to dispersal, I would need to know the actual shortest distance between the actual polygons and not only the centroids. Is there an easy way to obtain these in R or in GRASS? I am only aware of nearest neighbour distance between points.<br>

</blockquote>
<br></div>
In R, if the coordinates are projected, use gDistance(..., byid=TRUE) in the rgeos package to get a matrix in the metric of the projection. If not projected, project if possible.<br>
<br>
I don&#39;t think that the geosphere package provides for the unprojected case.<br>
<br>
Roger<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
<br>
Rainer<br>
<br>
<br>
- --<br>
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.<br>
(Germany)<br>
<br>
Centre of Excellence for Invasion Biology<br>
Stellenbosch University<br>
South Africa<br>
<br>
Tel :       <a href="tel:%2B33%20-%20%280%299%2053%2010%2027%2044" value="+33953102744" target="_blank">+33 - (0)9 53 10 27 44</a><br>
Cell:       <a href="tel:%2B33%20-%20%280%296%2085%2062%2059%2098" value="+33685625998" target="_blank">+33 - (0)6 85 62 59 98</a><br>
Fax :       <a href="tel:%2B33%20-%20%280%299%2058%2010%2027%2044" value="+33958102744" target="_blank">+33 - (0)9 58 10 27 44</a><br>
<br>
Fax (D):    <a href="tel:%2B49%20-%20%280%293%2021%2021%2025%2022%2044" value="+4932121252244" target="_blank">+49 - (0)3 21 21 25 22 44</a><br>
<br>
email:      <a href="mailto:Rainer@krugs.de" target="_blank">Rainer@krugs.de</a><br>
<br>
Skype:      RMkrug<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.11 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br>
<br>
iEYEARECAAYFAk+<u></u>nux4ACgkQoYgNqgF2egqaDgCeKx1Bk<u></u>rDsn+NldthK1GzFVYWp<br>
stwAnRz+uj47cBMNid/<u></u>QPdIRXwAnVs/8<br>
=yBff<br>
-----END PGP SIGNATURE-----<br>
______________________________<u></u>_________________<br>
grass-stats mailing list<br>
<a href="mailto:grass-stats@lists.osgeo.org" target="_blank">grass-stats@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-stats" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/grass-stats</a><br>
<br>
</blockquote>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Roger Bivand<br>
Department of Economics, NHH Norwegian School of Economics,<br>
Helleveien 30, N-5045 Bergen, Norway.<br>
voice: <a href="tel:%2B47%2055%2095%2093%2055" value="+4755959355" target="_blank">+47 55 95 93 55</a>; fax <a href="tel:%2B47%2055%2095%2095%2043" value="+4755959543" target="_blank">+47 55 95 95 43</a><br>
e-mail: <a href="mailto:Roger.Bivand@nhh.no" target="_blank">Roger.Bivand@nhh.no</a></font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
grass-stats mailing list<br>
<a href="mailto:grass-stats@lists.osgeo.org" target="_blank">grass-stats@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-stats" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/grass-stats</a><br>
</div></div></blockquote></div><br></div>