Dear Nils,
Situation:
I have several polygons which represent seperated areas of one 95 % UD-Kernel
homerange calculation. Now I need to find the radius of the smallest possible
circle that is able to enclose all areas of this homerange. I was already able
calculate the centroid of all points inside all included areas of the homerange
as the center for the circle. I now need to calculate the maximum distance from
the centroid to the most distant bit of margin from any of the polygons. Any
ideas about that? I later have to do it for many homeranges that can include
several polygons.
The center of the circle is not the centroid. The problem is not
mathematically simple, but computer solutions do exist. You will need
the function miniball from the package BARD to find the minimum
enclosing circle. Let us take an example to make clear how you can
calculate this circle:
library(BARD)
library(adehabitat)
data(puechabon)
## estimate the home-range of the animals
kud <- kernelUD(puechabon$locs[,c("X","Y")], puechabon$locs$Name)
## get the contour of the home-range
ver <- getverticeshr(kud)
plot(ver)
## consider for example Chou, who has two areas
chou <- ver$Chou
## find the enclosing circle
ball <- miniball(as.matrix(chou[,2:3]))
## draw the home range and the circle
plot(chou)
points(ball$center[1], ball$center[2], pch=16)
symbols(ball$center[1], ball$center[2], circle=sqrt(ball$sqradius),
add=TRUE, inches=FALSE, lwd=2)
HTH,
Clément Calenge
--
Clément CALENGE
Cellule d'appui à l'analyse de données
Office national de la chasse et de la faune sauvage
Saint Benoist - 78610 Auffargis
tel. (33) 01.30.46.54.14
_______________________________________________
AniMov mailing list
[email protected]
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov