[R-sig-Geo] neighbour patches
Roger Bivand
Roger.Bivand at nhh.no
Sun Feb 27 23:52:42 CET 2011
On Sat, 26 Feb 2011, Patrick Giraudoux wrote:
> Hi,
>
> I am tempted to dig in graph theory and analyse connections between discrete
> landscape patches. Re-reading 'Applied Spatial Data Analysis with R' I was
> happy to find basics chapter 9. However, it reports on graphs where
> (euclidian) distance is computed between patch centroids.
>
> Does anybody have an idea about strategies or packages permitting to use the
> shortest distance between patch borders instead (which is more realistic with
> regard to animal movement) ?
>
If the patches are Polygons objects in a SpatialPolygons object, the
gDistance() function in rgeos on R-Forge does this for planar coordinates,
for example:
gDistance(SP, SP, byid=TRUE)
returns a square distance matrix.
Roger
> Patrick
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list