[R-sig-Geo] Finding the Circumscribing Circle of a polygon

Michael Sumner mdsumner at gmail.com
Thu May 16 23:55:37 CEST 2013


Just FYI, there is  tripack::circumcircle, here's an example with data
in the maptools package.

library(maptools)

data(wrld_simpl)

poly <- wrld_simpl[wrld_simpl$NAME == "Australia", ]

## use coercion to get raw vertices (long winded, but avoids @ usage)
coords <- coordinates(as(as(poly, "SpatialLines"), "SpatialPoints"))


library(tripack)
cc<- circumcircle(coords[,1], coords[,2], plot = TRUE)
plot(poly, add = TRUE, col = "grey")


On Fri, May 17, 2013 at 7:39 AM, JLong <jlong at uvic.ca> wrote:
> Hey Mathieu and Greg,
>
> Great ideas, and thanks for the code Mathieu.
> I can't imagine a polygon shape where the 2nd step would ever by necessary?
> Can you elaborate on why that might be.
>
> FYI, Mathieu I'm attempting to compute the same shape/linearity metric as
> you.
>
> Cheers,
> Jed
>
>
>
>
> -----
> Jed Long
> PhD Candidate
> SPAR Lab, Dept. of Geography
> University of Victoria, Canada
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Finding-the-Circumscribing-Circle-of-a-polygon-tp7582372p7583598.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



-- 
Michael Sumner
Hobart, Australia
e-mail: mdsumner at gmail.com



More information about the R-sig-Geo mailing list