[R-sig-Geo] calculate minimum radial separation
wroberts at csir.co.za
Fri May 15 14:43:33 CEST 2009
I would like to calculate the minimum radial separation of a polygon. Basically this involves finding the minimum and maximum distance from the centroid of a polygon to its boundary. I am using it to calculate a roundness index (or something approximating that). Using spstat classes and functionality I have been able to calculate the shortest distance between a centroid and its polygon boundary (bdist.points) but would now like to calculate the maximum distance and have not been able to find a suitable function to do so. Below is an example of what I am trying to do, however bdist.points only returns the shortest distance, how do I calculate the maximum distance?
> w <- owin(c(10,20), c(10,30), unitname=c("foot","feet"))
> p <- ppp(15,20,window=w)
Is their a plug-and-play function in one of the spatial R packages to calculate the minimum maximum distance from a centroid to its polygon boundary?
Many thanks for your help,
Wesley Roberts MSc.
Researcher: Earth Observation (Ecosystems)
Natural Resources and the Environment
Tel: +27 (21) 888-2490
Fax: +27 (21) 888-2693
"To know the road ahead, ask those coming back."
- Chinese proverb
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
More information about the R-sig-Geo