[R-sig-Geo] Minimum bounding circle from cluster of points (Tina Cormier)

Michael Sumner mdsumner at gmail.com
Sun Jul 10 15:01:54 CEST 2016


I also have a (much more simplistic) use of CGAL here, for a different
algorithm but may help for seeing how to leverage it:

https://github.com/mdsumner/cgalgris

I've abandoned that now in favour of RTriangle, but still very interested
in uses of CGAL with R if anyone knows any more.

Cheers, Mike

On Sun, Jul 10, 2016, 22:44 chris english <englishchristophera at gmail.com>
wrote:

> Mel,
>
> Not a full implementation, but indicator of how one might do,
> https://rforge.net/rcgal/git.html, that Simon Urbanek styles : rcgal - R
> interface to a (small) subset of CGAL,
> and has inside (function) that takes arbitrary shape files and x/y to say
> inside or not.
>
> CGAL is a darn fine library and I guess you'd pick and choose which parts
> you'd wrap for your purposes.
>
> Chris
>
> On Sun, Jul 10, 2016 at 3:50 AM, Bacou, Melanie <mel at mbacou.com> wrote:
>
> > Interesting problem, it seems the exact approach is given by Fischer,
> 2003
> > and is implemented in a C++ CGAL package (see
> >
> http://stackoverflow.com/questions/9063453/how-to-compute-the-smallest-bounding-sphere-enclosing-other-bounding-spheres
> > ).
> >
> > I haven't found any binding for R, but there's an implementation in
> > PostGIS `ST_MinimumBoundingCircle()` (see
> > http://postgis.net/docs/ST_MinimumBoundingCircle.html).
> >
> > Others might be more up to date.
> > --Mel.
> >
> >
> >
> > On 7/9/2016 6:38 AM, Adrian Baddeley wrote:
> >
> >> Tina Cormier <TinaACormier at gmail.com> wrote:
> >>
> >> I'd like to create a circle around each cluster that is
> >>> the smallest circle that would encompass all 4 points.
> >>>
> >> The circumcircle.
> >>
> >> Try the following:
> >>
> >> <https://dl.dropboxusercontent.com/u/72421241/test_subplotsToPlots.zip
> ><
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo>library(spatstat)
> >>
> >> circumcircle <- function(x, ...) {   UseMethod("circumcircle") }
> >>
> >> circumcircle.owin <- function(x, ...) {
> >>    d2 <- fardist(x, ..., squared=TRUE)
> >>    z <- where.min(d2)
> >>    r <- sqrt(min(d2))
> >>    w <- disc(centre=z, radius=r)
> >>    return(w)
> >> }
> >>
> >> circumcircle.ppp <- function(x, ...) {
> >>    circumcircle(convexhull(x))
> >> }
> >>
> >>
> >> Adrian Baddeley
> >>
> >>         [[alternative HTML version deleted]]
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> R-sig-Geo at r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
-- 
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list