[R-sig-Geo] Find a circle center with spatial points

Chris Reudenbach reudenbach at uni-marburg.de
Fri Mar 18 19:49:55 CET 2016


Because it seems to be an arc and not a circle issue that you can solve 
the problem by
picking arbitrary two points of your assumed "arc" then construct 
(calculate)  the perpendicular bisector of
the line between them and do so for another arbitrary two points of the 
assumed "arc".

The intersection of the perpendicular lines is the assumed center of the 
arc.

If you iterate over all points this should be a pretty good estimation 
of the real center.

cheers Chris

Am 18.03.2016 um 18:36 schrieb Barry Rowlingson:
> On Fri, Mar 18, 2016 at 2:43 PM, Alex Mandel <tech_dev at wildintellect.com> wrote:
>> library(rgeos)
>> gCentroid
>>
>> http://www.rdocumentation.org/packages/rgeos/functions/topo-unary-gCentroid
>>
>> Assuming its a circle that would be the center.
> Only if you have points uniformly (or uniform-randomly) distributed
> round the full extent of the circle. From Adrien's plot it looks like
> he's got an arc there.
>
>   It seems more like a three-parameter optimisation problem. Find x, y,
> and r that define the circle that minimises the sum of squared
> distances from data points to the circle.
>
>   I'm not sure how you'd choose a good initial x,y,r for your optimiser
> since I suspect the surface you're optimising over is not unimodal...
> You could try taking lots of random samples of three points from your
> data and computing the unique circle that fits those points, then
> using the mean (or possibly median, there's a fair chance of massive
> outliers) value as the initial values.
>
> A quick googling has actually found this little paper on the subject:
>
> http://www.spaceroots.org/documents/circle/circle-fitting.pdf
>
> So I'll shut up now.
>
> Barry
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list